From d6f1f276c2f0f3624c9182407a094f531b714c3a Mon Sep 17 00:00:00 2001 From: langleyd Date: Mon, 12 Jul 2021 14:07:27 +0100 Subject: [PATCH 01/49] Add checkbox preference, remove PushRulePreference, Split adavanced fragment to new 3 new fragments and inherit common function --- .../im/vector/app/core/di/FragmentModule.kt | 9 +- .../preference/VectorCheckboxPreference.kt | 92 +++++++++++ ...sAdvancedNotificationPreferenceFragment.kt | 105 ------------ ...ngsGlobalNotificationPreferenceFragment.kt | 38 +++++ ...dMentionsNotificationPreferenceFragment.kt | 36 +++++ ...ingsOtherNotificationPreferenceFragment.kt | 37 +++++ ...PushRuleNotificationPreferenceFragment.kt} | 150 +++++++++--------- .../layout/vector_preference_push_rule.xml | 79 --------- vector/src/main/res/values/strings.xml | 6 + ...ings_notification_advanced_preferences.xml | 67 -------- .../vector_settings_notification_global.xml | 28 ++++ ...ngs_notification_mentions_and_keywords.xml | 23 +++ .../vector_settings_notification_other.xml | 27 ++++ .../res/xml/vector_settings_notifications.xml | 21 ++- 14 files changed, 383 insertions(+), 335 deletions(-) create mode 100644 vector/src/main/java/im/vector/app/core/preference/VectorCheckboxPreference.kt delete mode 100644 vector/src/main/java/im/vector/app/features/settings/VectorSettingsAdvancedNotificationPreferenceFragment.kt create mode 100644 vector/src/main/java/im/vector/app/features/settings/VectorSettingsGlobalNotificationPreferenceFragment.kt create mode 100644 vector/src/main/java/im/vector/app/features/settings/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt create mode 100644 vector/src/main/java/im/vector/app/features/settings/VectorSettingsOtherNotificationPreferenceFragment.kt rename vector/src/main/java/im/vector/app/{core/preference/PushRulePreference.kt => features/settings/VectorSettingsPushRuleNotificationPreferenceFragment.kt} (56%) mode change 100755 => 100644 delete mode 100644 vector/src/main/res/layout/vector_preference_push_rule.xml delete mode 100644 vector/src/main/res/xml/vector_settings_notification_advanced_preferences.xml create mode 100644 vector/src/main/res/xml/vector_settings_notification_global.xml create mode 100644 vector/src/main/res/xml/vector_settings_notification_mentions_and_keywords.xml create mode 100644 vector/src/main/res/xml/vector_settings_notification_other.xml diff --git a/vector/src/main/java/im/vector/app/core/di/FragmentModule.kt b/vector/src/main/java/im/vector/app/core/di/FragmentModule.kt index 8580543022..77e7e7ad72 100644 --- a/vector/src/main/java/im/vector/app/core/di/FragmentModule.kt +++ b/vector/src/main/java/im/vector/app/core/di/FragmentModule.kt @@ -111,7 +111,6 @@ import im.vector.app.features.roomprofile.settings.RoomSettingsFragment import im.vector.app.features.roomprofile.uploads.RoomUploadsFragment import im.vector.app.features.roomprofile.uploads.files.RoomUploadsFilesFragment import im.vector.app.features.roomprofile.uploads.media.RoomUploadsMediaFragment -import im.vector.app.features.settings.VectorSettingsAdvancedNotificationPreferenceFragment import im.vector.app.features.settings.VectorSettingsGeneralFragment import im.vector.app.features.settings.VectorSettingsHelpAboutFragment import im.vector.app.features.settings.VectorSettingsLabsFragment @@ -390,10 +389,10 @@ interface FragmentModule { @FragmentKey(VectorSettingsNotificationsTroubleshootFragment::class) fun bindVectorSettingsNotificationsTroubleshootFragment(fragment: VectorSettingsNotificationsTroubleshootFragment): Fragment - @Binds - @IntoMap - @FragmentKey(VectorSettingsAdvancedNotificationPreferenceFragment::class) - fun bindVectorSettingsAdvancedNotificationPreferenceFragment(fragment: VectorSettingsAdvancedNotificationPreferenceFragment): Fragment +// @Binds +// @IntoMap +// @FragmentKey(VectorSettingsAdvancedNotificationPreferenceFragment::class) +// fun bindVectorSettingsAdvancedNotificationPreferenceFragment(fragment: VectorSettingsAdvancedNotificationPreferenceFragment): Fragment @Binds @IntoMap diff --git a/vector/src/main/java/im/vector/app/core/preference/VectorCheckboxPreference.kt b/vector/src/main/java/im/vector/app/core/preference/VectorCheckboxPreference.kt new file mode 100644 index 0000000000..fd7a2ef5c5 --- /dev/null +++ b/vector/src/main/java/im/vector/app/core/preference/VectorCheckboxPreference.kt @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2021 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.app.core.preference + +import android.animation.Animator +import android.animation.ArgbEvaluator +import android.animation.ValueAnimator +import android.content.Context +import android.graphics.Color +import android.util.AttributeSet +import android.widget.TextView +import androidx.core.animation.doOnEnd +import androidx.preference.CheckBoxPreference +import androidx.preference.PreferenceViewHolder +import im.vector.app.R +import im.vector.app.features.themes.ThemeUtils + +open class VectorCheckboxPreference : CheckBoxPreference { + // Note: @JvmOverload does not work here... + constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) + + constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) + + constructor(context: Context, attrs: AttributeSet) : super(context, attrs) + + constructor(context: Context) : super(context) + + init { + // Set to false to remove the space when there is no icon + isIconSpaceReserved = true + } + + var isHighlighted = false + set(value) { + field = value + notifyChanged() + } + + var currentHighlightAnimator: Animator? = null + + override fun onBindViewHolder(holder: PreferenceViewHolder) { + // display the title in multi-line to avoid ellipsis. + (holder.findViewById(android.R.id.title) as? TextView)?.isSingleLine = false + + // cancel existing animation (find a way to resume if happens during anim?) + currentHighlightAnimator?.cancel() + + val itemView = holder.itemView + if (isHighlighted) { + val colorFrom = Color.TRANSPARENT + val colorTo = ThemeUtils.getColor(itemView.context, R.attr.colorControlHighlight) + currentHighlightAnimator = ValueAnimator.ofObject(ArgbEvaluator(), colorFrom, colorTo).apply { + duration = 250 // milliseconds + addUpdateListener { animator -> + itemView.setBackgroundColor(animator.animatedValue as Int) + } + doOnEnd { + currentHighlightAnimator = ValueAnimator.ofObject(ArgbEvaluator(), colorTo, colorFrom).apply { + duration = 250 // milliseconds + addUpdateListener { animator -> + itemView.setBackgroundColor(animator.animatedValue as Int) + } + doOnEnd { + isHighlighted = false + } + start() + } + } + startDelay = 200 + start() + } + } else { + itemView.setBackgroundColor(Color.TRANSPARENT) + } + + super.onBindViewHolder(holder) + } +} diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsAdvancedNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsAdvancedNotificationPreferenceFragment.kt deleted file mode 100644 index 8d9f8d7170..0000000000 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsAdvancedNotificationPreferenceFragment.kt +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2018 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package im.vector.app.features.settings - -import androidx.lifecycle.lifecycleScope -import androidx.preference.Preference -import im.vector.app.R -import im.vector.app.core.preference.PushRulePreference -import im.vector.app.core.preference.VectorPreference -import im.vector.app.core.utils.toast -import kotlinx.coroutines.launch -import org.matrix.android.sdk.api.pushrules.RuleIds -import org.matrix.android.sdk.api.pushrules.rest.PushRuleAndKind -import javax.inject.Inject - -class VectorSettingsAdvancedNotificationPreferenceFragment @Inject constructor() - : VectorSettingsBaseFragment() { - - override var titleRes: Int = R.string.settings_notification_advanced - - override val preferenceXmlRes = R.xml.vector_settings_notification_advanced_preferences - - override fun bindPref() { - for (preferenceKey in prefKeyToPushRuleId.keys) { - val preference = findPreference(preferenceKey) - if (preference is PushRulePreference) { - // preference.isEnabled = null != rules && isConnected && pushManager.areDeviceNotificationsAllowed() - val ruleAndKind: PushRuleAndKind? = session.getPushRules().findDefaultRule(prefKeyToPushRuleId[preferenceKey]) - - if (ruleAndKind == null) { - // The rule is not defined, hide the preference - preference.isVisible = false - } else { - preference.isVisible = true - preference.setPushRule(ruleAndKind) - preference.onPreferenceChangeListener = Preference.OnPreferenceChangeListener { _, newValue -> - val newRule = preference.createNewRule(newValue as Int) - if (newRule != null) { - displayLoadingView() - - lifecycleScope.launch { - val result = runCatching { - session.updatePushRuleActions(ruleAndKind.kind, - preference.ruleAndKind?.pushRule ?: ruleAndKind.pushRule, - newRule) - } - if (!isAdded) { - return@launch - } - hideLoadingView() - result.onSuccess { - preference.setPushRule(ruleAndKind.copy(pushRule = newRule)) - } - result.onFailure { failure -> - // Restore the previous value - refreshDisplay() - activity?.toast(errorFormatter.toHumanReadable(failure)) - } - } - } - false - } - } - } - } - } - - private fun refreshDisplay() { - listView?.adapter?.notifyDataSetChanged() - } - - /* ========================================================================================== - * Companion - * ========================================================================================== */ - - companion object { - // preference name <-> rule Id - private val prefKeyToPushRuleId = mapOf( - "SETTINGS_PUSH_RULE_CONTAINING_MY_DISPLAY_NAME_PREFERENCE_KEY" to RuleIds.RULE_ID_CONTAIN_DISPLAY_NAME, - "SETTINGS_PUSH_RULE_CONTAINING_MY_USER_NAME_PREFERENCE_KEY" to RuleIds.RULE_ID_CONTAIN_USER_NAME, - "SETTINGS_PUSH_RULE_MESSAGES_IN_ONE_TO_ONE_PREFERENCE_KEY" to RuleIds.RULE_ID_ONE_TO_ONE_ROOM, - "SETTINGS_PUSH_RULE_MESSAGES_IN_GROUP_CHAT_PREFERENCE_KEY" to RuleIds.RULE_ID_ALL_OTHER_MESSAGES_ROOMS, - "SETTINGS_PUSH_RULE_INVITED_TO_ROOM_PREFERENCE_KEY" to RuleIds.RULE_ID_INVITE_ME, - "SETTINGS_PUSH_RULE_CALL_INVITATIONS_PREFERENCE_KEY" to RuleIds.RULE_ID_CALL, - "SETTINGS_PUSH_RULE_MESSAGES_SENT_BY_BOT_PREFERENCE_KEY" to RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS, - "SETTINGS_PUSH_RULE_MESSAGES_CONTAINING_AT_ROOM_PREFERENCE_KEY" to RuleIds.RULE_ID_ROOM_NOTIF, - "SETTINGS_PUSH_RULE_MESSAGES_IN_E2E_ONE_ONE_CHAT_PREFERENCE_KEY" to RuleIds.RULE_ID_ONE_TO_ONE_ENCRYPTED_ROOM, - "SETTINGS_PUSH_RULE_MESSAGES_IN_E2E_GROUP_CHAT_PREFERENCE_KEY" to RuleIds.RULE_ID_ENCRYPTED, - "SETTINGS_PUSH_RULE_ROOMS_UPGRADED_KEY" to RuleIds.RULE_ID_TOMBSTONE - ) - } -} diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsGlobalNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsGlobalNotificationPreferenceFragment.kt new file mode 100644 index 0000000000..a91b3c5ef7 --- /dev/null +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsGlobalNotificationPreferenceFragment.kt @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2021 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.app.features.settings + +import im.vector.app.R +import org.matrix.android.sdk.api.pushrules.RuleIds +import javax.inject.Inject + +class VectorSettingsGlobalNotificationPreferenceFragment @Inject constructor() + : VectorSettingsPushRuleNotificationPreferenceFragment() { + + override var titleRes: Int = R.string.settings_notification_global + + override val preferenceXmlRes = R.xml.vector_settings_notification_global + + override val prefKeyToPushRuleId: Map + get() = mapOf( + "SETTINGS_PUSH_RULE_MESSAGES_IN_ONE_TO_ONE_PREFERENCE_KEY" to RuleIds.RULE_ID_ONE_TO_ONE_ROOM, + "SETTINGS_PUSH_RULE_MESSAGES_IN_GROUP_CHAT_PREFERENCE_KEY" to RuleIds.RULE_ID_ALL_OTHER_MESSAGES_ROOMS, + "SETTINGS_PUSH_RULE_MESSAGES_IN_E2E_ONE_ONE_CHAT_PREFERENCE_KEY" to RuleIds.RULE_ID_ONE_TO_ONE_ENCRYPTED_ROOM, + "SETTINGS_PUSH_RULE_MESSAGES_IN_E2E_GROUP_CHAT_PREFERENCE_KEY" to RuleIds.RULE_ID_ENCRYPTED + ) +} + diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt new file mode 100644 index 0000000000..0c7ed23070 --- /dev/null +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2021 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.app.features.settings + +import im.vector.app.R +import org.matrix.android.sdk.api.pushrules.RuleIds +import javax.inject.Inject + +class VectorSettingsKeywordAndMentionsNotificationPreferenceFragment @Inject constructor() + : VectorSettingsPushRuleNotificationPreferenceFragment() { + + override var titleRes: Int = R.string.settings_notification_mentions_and_keywords + + override val preferenceXmlRes = R.xml.vector_settings_notification_mentions_and_keywords + + override val prefKeyToPushRuleId: Map + get() = mapOf( + "SETTINGS_PUSH_RULE_CONTAINING_MY_DISPLAY_NAME_PREFERENCE_KEY" to RuleIds.RULE_ID_CONTAIN_DISPLAY_NAME, + "SETTINGS_PUSH_RULE_CONTAINING_MY_USER_NAME_PREFERENCE_KEY" to RuleIds.RULE_ID_CONTAIN_USER_NAME, + "SETTINGS_PUSH_RULE_MESSAGES_CONTAINING_AT_ROOM_PREFERENCE_KEY" to RuleIds.RULE_ID_ROOM_NOTIF + ) +} diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsOtherNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsOtherNotificationPreferenceFragment.kt new file mode 100644 index 0000000000..bf58ab27a1 --- /dev/null +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsOtherNotificationPreferenceFragment.kt @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2021 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.app.features.settings + +import im.vector.app.R +import org.matrix.android.sdk.api.pushrules.RuleIds +import javax.inject.Inject + +class VectorSettingsOtherNotificationPreferenceFragment @Inject constructor() + : VectorSettingsPushRuleNotificationPreferenceFragment() { + + override var titleRes: Int = R.string.settings_notification_other + + override val preferenceXmlRes = R.xml.vector_settings_notification_other + + override val prefKeyToPushRuleId: Map + get() = mapOf( + "SETTINGS_PUSH_RULE_INVITED_TO_ROOM_PREFERENCE_KEY" to RuleIds.RULE_ID_INVITE_ME, + "SETTINGS_PUSH_RULE_CALL_INVITATIONS_PREFERENCE_KEY" to RuleIds.RULE_ID_CALL, + "SETTINGS_PUSH_RULE_MESSAGES_SENT_BY_BOT_PREFERENCE_KEY" to RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS, + "SETTINGS_PUSH_RULE_ROOMS_UPGRADED_KEY" to RuleIds.RULE_ID_TOMBSTONE + ) +} diff --git a/vector/src/main/java/im/vector/app/core/preference/PushRulePreference.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPushRuleNotificationPreferenceFragment.kt old mode 100755 new mode 100644 similarity index 56% rename from vector/src/main/java/im/vector/app/core/preference/PushRulePreference.kt rename to vector/src/main/java/im/vector/app/features/settings/VectorSettingsPushRuleNotificationPreferenceFragment.kt index c3e324b64a..2f274ce904 --- a/vector/src/main/java/im/vector/app/core/preference/PushRulePreference.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPushRuleNotificationPreferenceFragment.kt @@ -1,5 +1,5 @@ /* - * Copyright 2018 New Vector Ltd + * Copyright (c) 2021 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,43 +14,39 @@ * limitations under the License. */ -package im.vector.app.core.preference +package im.vector.app.features.settings -import android.content.Context -import android.util.AttributeSet -import android.view.View -import android.widget.RadioGroup -import androidx.preference.PreferenceViewHolder -import im.vector.app.R +import androidx.lifecycle.lifecycleScope +import androidx.preference.Preference +import im.vector.app.core.preference.VectorCheckboxPreference +import im.vector.app.core.utils.toast +import kotlinx.coroutines.launch import org.matrix.android.sdk.api.pushrules.Action import org.matrix.android.sdk.api.pushrules.RuleIds import org.matrix.android.sdk.api.pushrules.RuleSetKey import org.matrix.android.sdk.api.pushrules.rest.PushRule import org.matrix.android.sdk.api.pushrules.rest.PushRuleAndKind -class PushRulePreference : VectorPreference { +abstract class VectorSettingsPushRuleNotificationPreferenceFragment + : VectorSettingsBaseFragment() { - /** - * @return the selected push rule and its kind - */ - var ruleAndKind: PushRuleAndKind? = null - private set - constructor(context: Context) : super(context) + fun indexFromBooleanPreference(pushRuleOn: Boolean): Int { + return if (pushRuleOn) { + NOTIFICATION_NOISY_INDEX + } else { + NOTIFICATION_OFF_INDEX + } + } - constructor(context: Context, attrs: AttributeSet) : super(context, attrs) - - constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) - - init { - layoutResource = R.layout.vector_preference_push_rule + fun booleanPreferenceFromIndex(index: Int): Boolean { + return index != NOTIFICATION_OFF_INDEX } /** * @return the bing rule status index */ - private val ruleStatusIndex: Int - get() { + fun ruleStatusIndexFor(ruleAndKind: PushRuleAndKind? ): Int { val safeRule = ruleAndKind?.pushRule ?: return NOTIFICATION_OFF_INDEX if (safeRule.ruleId == RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS) { @@ -78,36 +74,16 @@ class PushRulePreference : VectorPreference { return NOTIFICATION_OFF_INDEX } - /** - * Update the push rule. - * - * @param pushRule - */ - fun setPushRule(pushRuleAndKind: PushRuleAndKind?) { - ruleAndKind = pushRuleAndKind - refreshSummary() - } - - /** - * Refresh the summary - */ - private fun refreshSummary() { - summary = context.getString(when (ruleStatusIndex) { - NOTIFICATION_OFF_INDEX -> R.string.notification_off - NOTIFICATION_SILENT_INDEX -> R.string.notification_silent - else -> R.string.notification_noisy - }) - } - /** * Create a push rule with the updated required at index. * * @param index index * @return a push rule with the updated flags / null if there is no update */ - fun createNewRule(index: Int): PushRule? { + fun createNewRule(ruleAndKind: PushRuleAndKind?, index: Int): PushRule? { val safeRule = ruleAndKind?.pushRule ?: return null - val safeKind = ruleAndKind?.kind ?: return null + val safeKind = ruleAndKind.kind + val ruleStatusIndex = ruleStatusIndexFor(ruleAndKind) return if (index != ruleStatusIndex) { if (safeRule.ruleId == RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS) { @@ -126,7 +102,7 @@ class PushRulePreference : VectorPreference { .setNotify(true) .setNotificationSound() } - else -> safeRule + else -> safeRule } } else { if (NOTIFICATION_OFF_INDEX == index) { @@ -160,43 +136,67 @@ class PushRulePreference : VectorPreference { } } - override fun onBindViewHolder(holder: PreferenceViewHolder) { - super.onBindViewHolder(holder) - holder.findViewById(android.R.id.summary)?.visibility = View.GONE - holder.itemView.setOnClickListener(null) - holder.itemView.setOnLongClickListener(null) + override fun bindPref() { + for (preferenceKey in prefKeyToPushRuleId.keys) { + val preference = findPreference(preferenceKey)!! + // preference.isEnabled = null != rules && isConnected && pushManager.areDeviceNotificationsAllowed() + val ruleAndKind: PushRuleAndKind? = session.getPushRules().findDefaultRule(prefKeyToPushRuleId[preferenceKey]) - val radioGroup = holder.findViewById(R.id.bingPreferenceRadioGroup) as? RadioGroup - radioGroup?.setOnCheckedChangeListener(null) + if (ruleAndKind == null) { + // The rule is not defined, hide the preference + preference.isVisible = false + } else { + preference.isVisible = true - when (ruleStatusIndex) { - NOTIFICATION_OFF_INDEX -> { - radioGroup?.check(R.id.bingPreferenceRadioBingRuleOff) - } - NOTIFICATION_SILENT_INDEX -> { - radioGroup?.check(R.id.bingPreferenceRadioBingRuleSilent) - } - else -> { - radioGroup?.check(R.id.bingPreferenceRadioBingRuleNoisy) - } - } + val index = ruleStatusIndexFor(ruleAndKind) + val boolPreference = booleanPreferenceFromIndex(index) + preference.isChecked = boolPreference + preference.onPreferenceChangeListener = Preference.OnPreferenceChangeListener { _, newValue -> + val newIndex = indexFromBooleanPreference(newValue as Boolean) + val newRule = createNewRule(ruleAndKind, newIndex) - radioGroup?.setOnCheckedChangeListener { _, checkedId -> - when (checkedId) { - R.id.bingPreferenceRadioBingRuleOff -> { - onPreferenceChangeListener?.onPreferenceChange(this, NOTIFICATION_OFF_INDEX) - } - R.id.bingPreferenceRadioBingRuleSilent -> { - onPreferenceChangeListener?.onPreferenceChange(this, NOTIFICATION_SILENT_INDEX) - } - R.id.bingPreferenceRadioBingRuleNoisy -> { - onPreferenceChangeListener?.onPreferenceChange(this, NOTIFICATION_NOISY_INDEX) + if (newRule != null) { + displayLoadingView() + + lifecycleScope.launch { + val result = runCatching { + session.updatePushRuleActions( + ruleAndKind.kind, + ruleAndKind.pushRule, + newRule + ) + } + if (!isAdded) { + return@launch + } + hideLoadingView() + result.onSuccess { + preference.isChecked = newValue + } + result.onFailure { failure -> + // Restore the previous value + refreshDisplay() + activity?.toast(errorFormatter.toHumanReadable(failure)) + } + } + } + false } } } } + private fun refreshDisplay() { + listView?.adapter?.notifyDataSetChanged() + } + + /* ========================================================================================== + * Companion + * ========================================================================================== */ + + abstract val prefKeyToPushRuleId: Map + companion object { // index in mRuleStatuses diff --git a/vector/src/main/res/layout/vector_preference_push_rule.xml b/vector/src/main/res/layout/vector_preference_push_rule.xml deleted file mode 100644 index 5242bfdf85..0000000000 --- a/vector/src/main/res/layout/vector_preference_push_rule.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index 0159c98c20..154d5619b4 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -1075,6 +1075,12 @@ Advanced Notification Settings Notification importance by event + Global Notifications + Mentions and Keywords + Other + + Notify me for + Notification privacy Troubleshoot Notifications Troubleshooting diagnostics diff --git a/vector/src/main/res/xml/vector_settings_notification_advanced_preferences.xml b/vector/src/main/res/xml/vector_settings_notification_advanced_preferences.xml deleted file mode 100644 index 4e9a9b07bf..0000000000 --- a/vector/src/main/res/xml/vector_settings_notification_advanced_preferences.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vector/src/main/res/xml/vector_settings_notification_global.xml b/vector/src/main/res/xml/vector_settings_notification_global.xml new file mode 100644 index 0000000000..787419bd55 --- /dev/null +++ b/vector/src/main/res/xml/vector_settings_notification_global.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vector/src/main/res/xml/vector_settings_notification_mentions_and_keywords.xml b/vector/src/main/res/xml/vector_settings_notification_mentions_and_keywords.xml new file mode 100644 index 0000000000..c84bf53faa --- /dev/null +++ b/vector/src/main/res/xml/vector_settings_notification_mentions_and_keywords.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/vector/src/main/res/xml/vector_settings_notification_other.xml b/vector/src/main/res/xml/vector_settings_notification_other.xml new file mode 100644 index 0000000000..e1119e7c16 --- /dev/null +++ b/vector/src/main/res/xml/vector_settings_notification_other.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/vector/src/main/res/xml/vector_settings_notifications.xml b/vector/src/main/res/xml/vector_settings_notifications.xml index 983ddf36f2..35e21ca320 100644 --- a/vector/src/main/res/xml/vector_settings_notifications.xml +++ b/vector/src/main/res/xml/vector_settings_notifications.xml @@ -22,11 +22,24 @@ + android:title="@string/settings_notification_global" + app:fragment="im.vector.app.features.settings.VectorSettingsGlobalNotificationPreferenceFragment" /> + + + + + + + + + + + + + + From 7e156d372f7c1573e66c41d6a02aa17cbdf6e876 Mon Sep 17 00:00:00 2001 From: langleyd Date: Mon, 12 Jul 2021 14:08:35 +0100 Subject: [PATCH 02/49] Add checkbox preference, remove PushRulePreference, Split adavanced fragment to new 3 new fragments and inherit common function --- .../im/vector/app/core/di/FragmentModule.kt | 5 -- .../preference/VectorCheckboxPreference.kt | 47 ------------------- ...ngsGlobalNotificationPreferenceFragment.kt | 3 +- ...dMentionsNotificationPreferenceFragment.kt | 4 +- ...ingsOtherNotificationPreferenceFragment.kt | 3 +- .../res/xml/vector_settings_notifications.xml | 24 +++++----- 6 files changed, 16 insertions(+), 70 deletions(-) diff --git a/vector/src/main/java/im/vector/app/core/di/FragmentModule.kt b/vector/src/main/java/im/vector/app/core/di/FragmentModule.kt index 77e7e7ad72..7d50dbdcb5 100644 --- a/vector/src/main/java/im/vector/app/core/di/FragmentModule.kt +++ b/vector/src/main/java/im/vector/app/core/di/FragmentModule.kt @@ -389,11 +389,6 @@ interface FragmentModule { @FragmentKey(VectorSettingsNotificationsTroubleshootFragment::class) fun bindVectorSettingsNotificationsTroubleshootFragment(fragment: VectorSettingsNotificationsTroubleshootFragment): Fragment -// @Binds -// @IntoMap -// @FragmentKey(VectorSettingsAdvancedNotificationPreferenceFragment::class) -// fun bindVectorSettingsAdvancedNotificationPreferenceFragment(fragment: VectorSettingsAdvancedNotificationPreferenceFragment): Fragment - @Binds @IntoMap @FragmentKey(VectorSettingsNotificationPreferenceFragment::class) diff --git a/vector/src/main/java/im/vector/app/core/preference/VectorCheckboxPreference.kt b/vector/src/main/java/im/vector/app/core/preference/VectorCheckboxPreference.kt index fd7a2ef5c5..b66ea77bdd 100644 --- a/vector/src/main/java/im/vector/app/core/preference/VectorCheckboxPreference.kt +++ b/vector/src/main/java/im/vector/app/core/preference/VectorCheckboxPreference.kt @@ -16,18 +16,11 @@ package im.vector.app.core.preference -import android.animation.Animator -import android.animation.ArgbEvaluator -import android.animation.ValueAnimator import android.content.Context -import android.graphics.Color import android.util.AttributeSet import android.widget.TextView -import androidx.core.animation.doOnEnd import androidx.preference.CheckBoxPreference import androidx.preference.PreferenceViewHolder -import im.vector.app.R -import im.vector.app.features.themes.ThemeUtils open class VectorCheckboxPreference : CheckBoxPreference { // Note: @JvmOverload does not work here... @@ -44,49 +37,9 @@ open class VectorCheckboxPreference : CheckBoxPreference { isIconSpaceReserved = true } - var isHighlighted = false - set(value) { - field = value - notifyChanged() - } - - var currentHighlightAnimator: Animator? = null - override fun onBindViewHolder(holder: PreferenceViewHolder) { // display the title in multi-line to avoid ellipsis. (holder.findViewById(android.R.id.title) as? TextView)?.isSingleLine = false - - // cancel existing animation (find a way to resume if happens during anim?) - currentHighlightAnimator?.cancel() - - val itemView = holder.itemView - if (isHighlighted) { - val colorFrom = Color.TRANSPARENT - val colorTo = ThemeUtils.getColor(itemView.context, R.attr.colorControlHighlight) - currentHighlightAnimator = ValueAnimator.ofObject(ArgbEvaluator(), colorFrom, colorTo).apply { - duration = 250 // milliseconds - addUpdateListener { animator -> - itemView.setBackgroundColor(animator.animatedValue as Int) - } - doOnEnd { - currentHighlightAnimator = ValueAnimator.ofObject(ArgbEvaluator(), colorTo, colorFrom).apply { - duration = 250 // milliseconds - addUpdateListener { animator -> - itemView.setBackgroundColor(animator.animatedValue as Int) - } - doOnEnd { - isHighlighted = false - } - start() - } - } - startDelay = 200 - start() - } - } else { - itemView.setBackgroundColor(Color.TRANSPARENT) - } - super.onBindViewHolder(holder) } } diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsGlobalNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsGlobalNotificationPreferenceFragment.kt index a91b3c5ef7..7e6f51f0b6 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsGlobalNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsGlobalNotificationPreferenceFragment.kt @@ -18,9 +18,8 @@ package im.vector.app.features.settings import im.vector.app.R import org.matrix.android.sdk.api.pushrules.RuleIds -import javax.inject.Inject -class VectorSettingsGlobalNotificationPreferenceFragment @Inject constructor() +class VectorSettingsGlobalNotificationPreferenceFragment : VectorSettingsPushRuleNotificationPreferenceFragment() { override var titleRes: Int = R.string.settings_notification_global diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt index 0c7ed23070..2bf0a7c0ed 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt @@ -18,9 +18,9 @@ package im.vector.app.features.settings import im.vector.app.R import org.matrix.android.sdk.api.pushrules.RuleIds -import javax.inject.Inject -class VectorSettingsKeywordAndMentionsNotificationPreferenceFragment @Inject constructor() + +class VectorSettingsKeywordAndMentionsNotificationPreferenceFragment : VectorSettingsPushRuleNotificationPreferenceFragment() { override var titleRes: Int = R.string.settings_notification_mentions_and_keywords diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsOtherNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsOtherNotificationPreferenceFragment.kt index bf58ab27a1..64d5cda638 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsOtherNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsOtherNotificationPreferenceFragment.kt @@ -18,9 +18,8 @@ package im.vector.app.features.settings import im.vector.app.R import org.matrix.android.sdk.api.pushrules.RuleIds -import javax.inject.Inject -class VectorSettingsOtherNotificationPreferenceFragment @Inject constructor() +class VectorSettingsOtherNotificationPreferenceFragment : VectorSettingsPushRuleNotificationPreferenceFragment() { override var titleRes: Int = R.string.settings_notification_other diff --git a/vector/src/main/res/xml/vector_settings_notifications.xml b/vector/src/main/res/xml/vector_settings_notifications.xml index 35e21ca320..d19945cd46 100644 --- a/vector/src/main/res/xml/vector_settings_notifications.xml +++ b/vector/src/main/res/xml/vector_settings_notifications.xml @@ -27,19 +27,19 @@ android:title="@string/settings_notification_global" app:fragment="im.vector.app.features.settings.VectorSettingsGlobalNotificationPreferenceFragment" /> - - - - - - + - - - - - - + From 727ce7272a58d33efcce6375d8e726933758f4e4 Mon Sep 17 00:00:00 2001 From: David Langley Date: Mon, 12 Jul 2021 18:38:56 +0100 Subject: [PATCH 03/49] update translations --- .../troubleshoot/TestPushRulesSettings.kt | 5 ----- vector/src/main/res/values/strings.xml | 20 +++++++++---------- .../vector_settings_notification_global.xml | 8 ++++---- ...ngs_notification_mentions_and_keywords.xml | 4 ++-- .../vector_settings_notification_other.xml | 6 +++--- 5 files changed, 19 insertions(+), 24 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestPushRulesSettings.kt b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestPushRulesSettings.kt index 8dcf9ab6ce..eea5705b7a 100644 --- a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestPushRulesSettings.kt +++ b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestPushRulesSettings.kt @@ -35,11 +35,6 @@ class TestPushRulesSettings @Inject constructor(private val activeSessionHolder: RuleIds.RULE_ID_ONE_TO_ONE_ROOM, RuleIds.RULE_ID_ALL_OTHER_MESSAGES_ROOMS) - val ruleSettingsName = arrayOf(R.string.settings_containing_my_display_name, - R.string.settings_containing_my_user_name, - R.string.settings_messages_in_one_to_one, - R.string.settings_messages_in_group_chat) - override fun perform(activityResultLauncher: ActivityResultLauncher) { val session = activeSessionHolder.getSafeActiveSession() ?: return val pushRules = session.getPushRules().getAllRules() diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index 154d5619b4..a80ed06186 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -1190,13 +1190,17 @@ Choose LED color, vibration, sound… - Msgs containing my display name - Msgs containing my user name - Msgs in one-to-one chats - Msgs in group chats - When I’m invited to a room + Messages containing my display name + Messages containing my username + Direct messages + Encrypted direct messages + Group messages + Encrypted group messages + Messages containing @room + Room invitations Call invitations - Messages sent by bot + Messages by bot + Room upgrades Background synchronization Background Sync Mode @@ -2948,10 +2952,6 @@ Failed to import keys Notifications configuration - Messages containing @room - Encrypted messages in one-to-one chats - Encrypted messages in group chats - When rooms are upgraded Troubleshoot Set notification importance by event diff --git a/vector/src/main/res/xml/vector_settings_notification_global.xml b/vector/src/main/res/xml/vector_settings_notification_global.xml index 787419bd55..70defb32c4 100644 --- a/vector/src/main/res/xml/vector_settings_notification_global.xml +++ b/vector/src/main/res/xml/vector_settings_notification_global.xml @@ -7,22 +7,22 @@ + android:title="@string/settings_messages_direct_messages" /> + android:title="@string/settings_encrypted_direct_messages" /> + android:title="@string/settings_group_messages" /> + android:title="@string/settings_encrypted_group_messages" /> \ No newline at end of file diff --git a/vector/src/main/res/xml/vector_settings_notification_mentions_and_keywords.xml b/vector/src/main/res/xml/vector_settings_notification_mentions_and_keywords.xml index c84bf53faa..18de36cb52 100644 --- a/vector/src/main/res/xml/vector_settings_notification_mentions_and_keywords.xml +++ b/vector/src/main/res/xml/vector_settings_notification_mentions_and_keywords.xml @@ -7,12 +7,12 @@ + android:title="@string/settings_messages_containing_display_name" /> + android:title="@string/settings_messages_containing_username" /> + android:title="@string/settings_room_invitations" /> + android:title="@string/settings_messages_by_bot" /> + android:title="@string/settings_room_upgrades" /> \ No newline at end of file From a3204fdad954650df2f6c00c4803cea2b7c1f88d Mon Sep 17 00:00:00 2001 From: David Langley Date: Tue, 13 Jul 2021 21:22:56 +0100 Subject: [PATCH 04/49] add resValue to enable feature, put back old code --- vector/build.gradle | 3 + .../im/vector/app/core/di/FragmentModule.kt | 6 + .../app/core/preference/PushRulePreference.kt | 207 ++++++++++++++++++ ...sAdvancedNotificationPreferenceFragment.kt | 105 +++++++++ ...sPushRuleNotificationPreferenceFragment.kt | 181 +++++---------- .../layout/vector_preference_push_rule.xml | 78 +++++++ vector/src/main/res/values/strings.xml | 9 + ...ings_notification_advanced_preferences.xml | 67 ++++++ .../res/xml/vector_settings_notifications.xml | 18 +- 9 files changed, 548 insertions(+), 126 deletions(-) create mode 100644 vector/src/main/java/im/vector/app/core/preference/PushRulePreference.kt create mode 100644 vector/src/main/java/im/vector/app/features/settings/VectorSettingsAdvancedNotificationPreferenceFragment.kt create mode 100644 vector/src/main/res/layout/vector_preference_push_rule.xml create mode 100644 vector/src/main/res/xml/vector_settings_notification_advanced_preferences.xml diff --git a/vector/build.gradle b/vector/build.gradle index 8e8e5bc3dc..7003ab1834 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -142,6 +142,9 @@ android { resValue "bool", "useLoginV1", "true" resValue "bool", "useLoginV2", "false" + resValue "bool", "useNotificationSettingsV1", "true" + resValue "bool", "useNotificationSettingsV2", "false" + buildConfigField "im.vector.app.features.crypto.keysrequest.OutboundSessionKeySharingStrategy", "outboundSessionKeySharingStrategy", "im.vector.app.features.crypto.keysrequest.OutboundSessionKeySharingStrategy.WhenTyping" // If set, MSC3086 asserted identity messages sent on VoIP calls will cause the call to appear in the room corresponding to the asserted identity. diff --git a/vector/src/main/java/im/vector/app/core/di/FragmentModule.kt b/vector/src/main/java/im/vector/app/core/di/FragmentModule.kt index 7d50dbdcb5..7da26a3ea1 100644 --- a/vector/src/main/java/im/vector/app/core/di/FragmentModule.kt +++ b/vector/src/main/java/im/vector/app/core/di/FragmentModule.kt @@ -111,6 +111,7 @@ import im.vector.app.features.roomprofile.settings.RoomSettingsFragment import im.vector.app.features.roomprofile.uploads.RoomUploadsFragment import im.vector.app.features.roomprofile.uploads.files.RoomUploadsFilesFragment import im.vector.app.features.roomprofile.uploads.media.RoomUploadsMediaFragment +import im.vector.app.features.settings.VectorSettingsAdvancedNotificationPreferenceFragment import im.vector.app.features.settings.VectorSettingsGeneralFragment import im.vector.app.features.settings.VectorSettingsHelpAboutFragment import im.vector.app.features.settings.VectorSettingsLabsFragment @@ -384,6 +385,11 @@ interface FragmentModule { @FragmentKey(PushGatewaysFragment::class) fun bindPushGatewaysFragment(fragment: PushGatewaysFragment): Fragment + @Binds + @IntoMap + @FragmentKey(VectorSettingsAdvancedNotificationPreferenceFragment::class) + fun bindVectorSettingsAdvancedNotificationPreferenceFragment(fragment: VectorSettingsAdvancedNotificationPreferenceFragment): Fragment + @Binds @IntoMap @FragmentKey(VectorSettingsNotificationsTroubleshootFragment::class) diff --git a/vector/src/main/java/im/vector/app/core/preference/PushRulePreference.kt b/vector/src/main/java/im/vector/app/core/preference/PushRulePreference.kt new file mode 100644 index 0000000000..c3e324b64a --- /dev/null +++ b/vector/src/main/java/im/vector/app/core/preference/PushRulePreference.kt @@ -0,0 +1,207 @@ +/* + * Copyright 2018 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.app.core.preference + +import android.content.Context +import android.util.AttributeSet +import android.view.View +import android.widget.RadioGroup +import androidx.preference.PreferenceViewHolder +import im.vector.app.R +import org.matrix.android.sdk.api.pushrules.Action +import org.matrix.android.sdk.api.pushrules.RuleIds +import org.matrix.android.sdk.api.pushrules.RuleSetKey +import org.matrix.android.sdk.api.pushrules.rest.PushRule +import org.matrix.android.sdk.api.pushrules.rest.PushRuleAndKind + +class PushRulePreference : VectorPreference { + + /** + * @return the selected push rule and its kind + */ + var ruleAndKind: PushRuleAndKind? = null + private set + + constructor(context: Context) : super(context) + + constructor(context: Context, attrs: AttributeSet) : super(context, attrs) + + constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) + + init { + layoutResource = R.layout.vector_preference_push_rule + } + + /** + * @return the bing rule status index + */ + private val ruleStatusIndex: Int + get() { + val safeRule = ruleAndKind?.pushRule ?: return NOTIFICATION_OFF_INDEX + + if (safeRule.ruleId == RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS) { + if (safeRule.shouldNotNotify()) { + return if (safeRule.enabled) { + NOTIFICATION_OFF_INDEX + } else { + NOTIFICATION_SILENT_INDEX + } + } else if (safeRule.shouldNotify()) { + return NOTIFICATION_NOISY_INDEX + } + } + + if (safeRule.enabled) { + return if (safeRule.shouldNotNotify()) { + NOTIFICATION_OFF_INDEX + } else if (safeRule.getNotificationSound() != null) { + NOTIFICATION_NOISY_INDEX + } else { + NOTIFICATION_SILENT_INDEX + } + } + + return NOTIFICATION_OFF_INDEX + } + + /** + * Update the push rule. + * + * @param pushRule + */ + fun setPushRule(pushRuleAndKind: PushRuleAndKind?) { + ruleAndKind = pushRuleAndKind + refreshSummary() + } + + /** + * Refresh the summary + */ + private fun refreshSummary() { + summary = context.getString(when (ruleStatusIndex) { + NOTIFICATION_OFF_INDEX -> R.string.notification_off + NOTIFICATION_SILENT_INDEX -> R.string.notification_silent + else -> R.string.notification_noisy + }) + } + + /** + * Create a push rule with the updated required at index. + * + * @param index index + * @return a push rule with the updated flags / null if there is no update + */ + fun createNewRule(index: Int): PushRule? { + val safeRule = ruleAndKind?.pushRule ?: return null + val safeKind = ruleAndKind?.kind ?: return null + + return if (index != ruleStatusIndex) { + if (safeRule.ruleId == RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS) { + when (index) { + NOTIFICATION_OFF_INDEX -> { + safeRule.copy(enabled = true) + .setNotify(false) + .removeNotificationSound() + } + NOTIFICATION_SILENT_INDEX -> { + safeRule.copy(enabled = false) + .setNotify(false) + } + NOTIFICATION_NOISY_INDEX -> { + safeRule.copy(enabled = true) + .setNotify(true) + .setNotificationSound() + } + else -> safeRule + } + } else { + if (NOTIFICATION_OFF_INDEX == index) { + if (safeKind == RuleSetKey.UNDERRIDE || safeRule.ruleId == RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS) { + safeRule.setNotify(false) + } else { + safeRule.copy(enabled = false) + } + } else { + val newRule = safeRule.copy(enabled = true) + .setNotify(true) + .setHighlight(safeKind != RuleSetKey.UNDERRIDE + && safeRule.ruleId != RuleIds.RULE_ID_INVITE_ME + && NOTIFICATION_NOISY_INDEX == index) + + if (NOTIFICATION_NOISY_INDEX == index) { + newRule.setNotificationSound( + if (safeRule.ruleId == RuleIds.RULE_ID_CALL) { + Action.ACTION_OBJECT_VALUE_VALUE_RING + } else { + Action.ACTION_OBJECT_VALUE_VALUE_DEFAULT + } + ) + } else { + newRule.removeNotificationSound() + } + } + } + } else { + safeRule + } + } + + override fun onBindViewHolder(holder: PreferenceViewHolder) { + super.onBindViewHolder(holder) + + holder.findViewById(android.R.id.summary)?.visibility = View.GONE + holder.itemView.setOnClickListener(null) + holder.itemView.setOnLongClickListener(null) + + val radioGroup = holder.findViewById(R.id.bingPreferenceRadioGroup) as? RadioGroup + radioGroup?.setOnCheckedChangeListener(null) + + when (ruleStatusIndex) { + NOTIFICATION_OFF_INDEX -> { + radioGroup?.check(R.id.bingPreferenceRadioBingRuleOff) + } + NOTIFICATION_SILENT_INDEX -> { + radioGroup?.check(R.id.bingPreferenceRadioBingRuleSilent) + } + else -> { + radioGroup?.check(R.id.bingPreferenceRadioBingRuleNoisy) + } + } + + radioGroup?.setOnCheckedChangeListener { _, checkedId -> + when (checkedId) { + R.id.bingPreferenceRadioBingRuleOff -> { + onPreferenceChangeListener?.onPreferenceChange(this, NOTIFICATION_OFF_INDEX) + } + R.id.bingPreferenceRadioBingRuleSilent -> { + onPreferenceChangeListener?.onPreferenceChange(this, NOTIFICATION_SILENT_INDEX) + } + R.id.bingPreferenceRadioBingRuleNoisy -> { + onPreferenceChangeListener?.onPreferenceChange(this, NOTIFICATION_NOISY_INDEX) + } + } + } + } + + companion object { + + // index in mRuleStatuses + private const val NOTIFICATION_OFF_INDEX = 0 + private const val NOTIFICATION_SILENT_INDEX = 1 + private const val NOTIFICATION_NOISY_INDEX = 2 + } +} diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsAdvancedNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsAdvancedNotificationPreferenceFragment.kt new file mode 100644 index 0000000000..8d9f8d7170 --- /dev/null +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsAdvancedNotificationPreferenceFragment.kt @@ -0,0 +1,105 @@ +/* + * Copyright 2018 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package im.vector.app.features.settings + +import androidx.lifecycle.lifecycleScope +import androidx.preference.Preference +import im.vector.app.R +import im.vector.app.core.preference.PushRulePreference +import im.vector.app.core.preference.VectorPreference +import im.vector.app.core.utils.toast +import kotlinx.coroutines.launch +import org.matrix.android.sdk.api.pushrules.RuleIds +import org.matrix.android.sdk.api.pushrules.rest.PushRuleAndKind +import javax.inject.Inject + +class VectorSettingsAdvancedNotificationPreferenceFragment @Inject constructor() + : VectorSettingsBaseFragment() { + + override var titleRes: Int = R.string.settings_notification_advanced + + override val preferenceXmlRes = R.xml.vector_settings_notification_advanced_preferences + + override fun bindPref() { + for (preferenceKey in prefKeyToPushRuleId.keys) { + val preference = findPreference(preferenceKey) + if (preference is PushRulePreference) { + // preference.isEnabled = null != rules && isConnected && pushManager.areDeviceNotificationsAllowed() + val ruleAndKind: PushRuleAndKind? = session.getPushRules().findDefaultRule(prefKeyToPushRuleId[preferenceKey]) + + if (ruleAndKind == null) { + // The rule is not defined, hide the preference + preference.isVisible = false + } else { + preference.isVisible = true + preference.setPushRule(ruleAndKind) + preference.onPreferenceChangeListener = Preference.OnPreferenceChangeListener { _, newValue -> + val newRule = preference.createNewRule(newValue as Int) + if (newRule != null) { + displayLoadingView() + + lifecycleScope.launch { + val result = runCatching { + session.updatePushRuleActions(ruleAndKind.kind, + preference.ruleAndKind?.pushRule ?: ruleAndKind.pushRule, + newRule) + } + if (!isAdded) { + return@launch + } + hideLoadingView() + result.onSuccess { + preference.setPushRule(ruleAndKind.copy(pushRule = newRule)) + } + result.onFailure { failure -> + // Restore the previous value + refreshDisplay() + activity?.toast(errorFormatter.toHumanReadable(failure)) + } + } + } + false + } + } + } + } + } + + private fun refreshDisplay() { + listView?.adapter?.notifyDataSetChanged() + } + + /* ========================================================================================== + * Companion + * ========================================================================================== */ + + companion object { + // preference name <-> rule Id + private val prefKeyToPushRuleId = mapOf( + "SETTINGS_PUSH_RULE_CONTAINING_MY_DISPLAY_NAME_PREFERENCE_KEY" to RuleIds.RULE_ID_CONTAIN_DISPLAY_NAME, + "SETTINGS_PUSH_RULE_CONTAINING_MY_USER_NAME_PREFERENCE_KEY" to RuleIds.RULE_ID_CONTAIN_USER_NAME, + "SETTINGS_PUSH_RULE_MESSAGES_IN_ONE_TO_ONE_PREFERENCE_KEY" to RuleIds.RULE_ID_ONE_TO_ONE_ROOM, + "SETTINGS_PUSH_RULE_MESSAGES_IN_GROUP_CHAT_PREFERENCE_KEY" to RuleIds.RULE_ID_ALL_OTHER_MESSAGES_ROOMS, + "SETTINGS_PUSH_RULE_INVITED_TO_ROOM_PREFERENCE_KEY" to RuleIds.RULE_ID_INVITE_ME, + "SETTINGS_PUSH_RULE_CALL_INVITATIONS_PREFERENCE_KEY" to RuleIds.RULE_ID_CALL, + "SETTINGS_PUSH_RULE_MESSAGES_SENT_BY_BOT_PREFERENCE_KEY" to RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS, + "SETTINGS_PUSH_RULE_MESSAGES_CONTAINING_AT_ROOM_PREFERENCE_KEY" to RuleIds.RULE_ID_ROOM_NOTIF, + "SETTINGS_PUSH_RULE_MESSAGES_IN_E2E_ONE_ONE_CHAT_PREFERENCE_KEY" to RuleIds.RULE_ID_ONE_TO_ONE_ENCRYPTED_ROOM, + "SETTINGS_PUSH_RULE_MESSAGES_IN_E2E_GROUP_CHAT_PREFERENCE_KEY" to RuleIds.RULE_ID_ENCRYPTED, + "SETTINGS_PUSH_RULE_ROOMS_UPGRADED_KEY" to RuleIds.RULE_ID_TOMBSTONE + ) + } +} diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPushRuleNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPushRuleNotificationPreferenceFragment.kt index 2f274ce904..6683cf3038 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPushRuleNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPushRuleNotificationPreferenceFragment.kt @@ -30,105 +30,58 @@ import org.matrix.android.sdk.api.pushrules.rest.PushRuleAndKind abstract class VectorSettingsPushRuleNotificationPreferenceFragment : VectorSettingsBaseFragment() { - - fun indexFromBooleanPreference(pushRuleOn: Boolean): Int { - return if (pushRuleOn) { - NOTIFICATION_NOISY_INDEX - } else { - NOTIFICATION_OFF_INDEX - } - } - - fun booleanPreferenceFromIndex(index: Int): Boolean { - return index != NOTIFICATION_OFF_INDEX - } - /** - * @return the bing rule status index + * @return the bing rule status boolean */ - fun ruleStatusIndexFor(ruleAndKind: PushRuleAndKind? ): Int { - val safeRule = ruleAndKind?.pushRule ?: return NOTIFICATION_OFF_INDEX - - if (safeRule.ruleId == RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS) { - if (safeRule.shouldNotNotify()) { - return if (safeRule.enabled) { - NOTIFICATION_OFF_INDEX - } else { - NOTIFICATION_SILENT_INDEX - } - } else if (safeRule.shouldNotify()) { - return NOTIFICATION_NOISY_INDEX - } - } - - if (safeRule.enabled) { - return if (safeRule.shouldNotNotify()) { - NOTIFICATION_OFF_INDEX - } else if (safeRule.getNotificationSound() != null) { - NOTIFICATION_NOISY_INDEX - } else { - NOTIFICATION_SILENT_INDEX - } - } - - return NOTIFICATION_OFF_INDEX + fun ruleStatusIndexFor(ruleAndKind: PushRuleAndKind): Boolean { + val rule = ruleAndKind.pushRule + if (rule.ruleId == RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS) { + return rule.shouldNotify() || rule.shouldNotNotify() && !rule.enabled } + return rule.enabled && !rule.shouldNotNotify() + } /** * Create a push rule with the updated required at index. * - * @param index index - * @return a push rule with the updated flags / null if there is no update + * @param status boolean checkbox status + * @return a push rule with the updated flags */ - fun createNewRule(ruleAndKind: PushRuleAndKind?, index: Int): PushRule? { - val safeRule = ruleAndKind?.pushRule ?: return null + fun createNewRule(ruleAndKind: PushRuleAndKind, status: Boolean): PushRule { + val safeRule = ruleAndKind.pushRule val safeKind = ruleAndKind.kind val ruleStatusIndex = ruleStatusIndexFor(ruleAndKind) - return if (index != ruleStatusIndex) { + return if (status != ruleStatusIndex) { if (safeRule.ruleId == RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS) { - when (index) { - NOTIFICATION_OFF_INDEX -> { - safeRule.copy(enabled = true) - .setNotify(false) - .removeNotificationSound() - } - NOTIFICATION_SILENT_INDEX -> { - safeRule.copy(enabled = false) - .setNotify(false) - } - NOTIFICATION_NOISY_INDEX -> { - safeRule.copy(enabled = true) - .setNotify(true) - .setNotificationSound() - } - else -> safeRule + if (status) { + safeRule.copy(enabled = true) + .setNotify(true) + .setNotificationSound() + } else { + safeRule.copy(enabled = true) + .setNotify(false) + .removeNotificationSound() } } else { - if (NOTIFICATION_OFF_INDEX == index) { + if (status) { + safeRule.copy(enabled = true) + .setNotify(true) + .setHighlight(safeKind != RuleSetKey.UNDERRIDE + && safeRule.ruleId != RuleIds.RULE_ID_INVITE_ME) + .setNotificationSound( + if (safeRule.ruleId == RuleIds.RULE_ID_CALL) { + Action.ACTION_OBJECT_VALUE_VALUE_RING + } else { + Action.ACTION_OBJECT_VALUE_VALUE_DEFAULT + } + ) + } else { if (safeKind == RuleSetKey.UNDERRIDE || safeRule.ruleId == RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS) { safeRule.setNotify(false) } else { safeRule.copy(enabled = false) } - } else { - val newRule = safeRule.copy(enabled = true) - .setNotify(true) - .setHighlight(safeKind != RuleSetKey.UNDERRIDE - && safeRule.ruleId != RuleIds.RULE_ID_INVITE_ME - && NOTIFICATION_NOISY_INDEX == index) - - if (NOTIFICATION_NOISY_INDEX == index) { - newRule.setNotificationSound( - if (safeRule.ruleId == RuleIds.RULE_ID_CALL) { - Action.ACTION_OBJECT_VALUE_VALUE_RING - } else { - Action.ACTION_OBJECT_VALUE_VALUE_DEFAULT - } - ) - } else { - newRule.removeNotificationSound() - } } } } else { @@ -136,51 +89,44 @@ abstract class VectorSettingsPushRuleNotificationPreferenceFragment } } - override fun bindPref() { for (preferenceKey in prefKeyToPushRuleId.keys) { val preference = findPreference(preferenceKey)!! - // preference.isEnabled = null != rules && isConnected && pushManager.areDeviceNotificationsAllowed() val ruleAndKind: PushRuleAndKind? = session.getPushRules().findDefaultRule(prefKeyToPushRuleId[preferenceKey]) - if (ruleAndKind == null) { // The rule is not defined, hide the preference preference.isVisible = false } else { + var oldRuleAndKind: PushRuleAndKind = ruleAndKind preference.isVisible = true - - val index = ruleStatusIndexFor(ruleAndKind) - val boolPreference = booleanPreferenceFromIndex(index) - preference.isChecked = boolPreference + preference.isChecked = ruleStatusIndexFor(ruleAndKind) preference.onPreferenceChangeListener = Preference.OnPreferenceChangeListener { _, newValue -> - val newIndex = indexFromBooleanPreference(newValue as Boolean) - val newRule = createNewRule(ruleAndKind, newIndex) + val newRule = createNewRule(ruleAndKind, newValue as Boolean) + displayLoadingView() - if (newRule != null) { - displayLoadingView() - - lifecycleScope.launch { - val result = runCatching { - session.updatePushRuleActions( - ruleAndKind.kind, - ruleAndKind.pushRule, - newRule - ) - } - if (!isAdded) { - return@launch - } - hideLoadingView() - result.onSuccess { - preference.isChecked = newValue - } - result.onFailure { failure -> - // Restore the previous value - refreshDisplay() - activity?.toast(errorFormatter.toHumanReadable(failure)) - } + lifecycleScope.launch { + val result = runCatching { + session.updatePushRuleActions( + oldRuleAndKind.kind, + oldRuleAndKind.pushRule, + newRule + ) + } + if (!isAdded) { + return@launch + } + hideLoadingView() + result.onSuccess { + oldRuleAndKind = oldRuleAndKind.copy(pushRule = newRule) + preference.isChecked = newValue + } + result.onFailure { failure -> + // Restore the previous value + refreshDisplay() + activity?.toast(errorFormatter.toHumanReadable(failure)) } } + false } } @@ -191,17 +137,6 @@ abstract class VectorSettingsPushRuleNotificationPreferenceFragment listView?.adapter?.notifyDataSetChanged() } - /* ========================================================================================== - * Companion - * ========================================================================================== */ - abstract val prefKeyToPushRuleId: Map - companion object { - - // index in mRuleStatuses - private const val NOTIFICATION_OFF_INDEX = 0 - private const val NOTIFICATION_SILENT_INDEX = 1 - private const val NOTIFICATION_NOISY_INDEX = 2 - } } diff --git a/vector/src/main/res/layout/vector_preference_push_rule.xml b/vector/src/main/res/layout/vector_preference_push_rule.xml new file mode 100644 index 0000000000..3da5c81410 --- /dev/null +++ b/vector/src/main/res/layout/vector_preference_push_rule.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index a80ed06186..7f93cd3957 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -1189,6 +1189,15 @@ Configure Silent Notifications Choose LED color, vibration, sound… + Encrypted messages in one-to-one chats + Encrypted messages in group chats + When rooms are upgraded + Msgs containing my display name + Msgs containing my user name + Msgs in one-to-one chats + Msgs in group chats + When I’m invited to a room + Messages sent by bot Messages containing my display name Messages containing my username diff --git a/vector/src/main/res/xml/vector_settings_notification_advanced_preferences.xml b/vector/src/main/res/xml/vector_settings_notification_advanced_preferences.xml new file mode 100644 index 0000000000..436858ac05 --- /dev/null +++ b/vector/src/main/res/xml/vector_settings_notification_advanced_preferences.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vector/src/main/res/xml/vector_settings_notifications.xml b/vector/src/main/res/xml/vector_settings_notifications.xml index d19945cd46..c9668bcd4d 100644 --- a/vector/src/main/res/xml/vector_settings_notifications.xml +++ b/vector/src/main/res/xml/vector_settings_notifications.xml @@ -20,26 +20,38 @@ + + + app:fragment="im.vector.app.features.settings.VectorSettingsGlobalNotificationPreferenceFragment" + app:isPreferenceVisible="@bool/useNotificationSettingsV2"/> + app:fragment="im.vector.app.features.settings.VectorSettingsKeywordAndMentionsNotificationPreferenceFragment" + app:isPreferenceVisible="@bool/useNotificationSettingsV2"/> + app:fragment="im.vector.app.features.settings.VectorSettingsOtherNotificationPreferenceFragment" + app:isPreferenceVisible="@bool/useNotificationSettingsV2"/> From 5044b21545fe0588f5d269f7740dc67d0db36d13 Mon Sep 17 00:00:00 2001 From: David Langley Date: Wed, 14 Jul 2021 11:49:16 +0100 Subject: [PATCH 05/49] add changelog, checks/tests --- changelog.d/3646.feature | 1 + vector/build.gradle | 1 + .../VectorSettingsGlobalNotificationPreferenceFragment.kt | 1 - ...ettingsKeywordAndMentionsNotificationPreferenceFragment.kt | 1 - .../VectorSettingsPushRuleNotificationPreferenceFragment.kt | 1 - .../src/main/res/xml/vector_settings_notification_global.xml | 4 ++-- .../vector_settings_notification_mentions_and_keywords.xml | 4 ++-- .../src/main/res/xml/vector_settings_notification_other.xml | 4 ++-- 8 files changed, 8 insertions(+), 9 deletions(-) create mode 100644 changelog.d/3646.feature diff --git a/changelog.d/3646.feature b/changelog.d/3646.feature new file mode 100644 index 0000000000..ba2e870052 --- /dev/null +++ b/changelog.d/3646.feature @@ -0,0 +1 @@ +Reorganise Advanced Notifications in to Global Notifications, Keywords and Mentions, Other (This feature is hidden in the release ui until a future release date.) \ No newline at end of file diff --git a/vector/build.gradle b/vector/build.gradle index eaf70e50b1..dabdcfb4dc 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -142,6 +142,7 @@ android { resValue "bool", "useLoginV1", "true" resValue "bool", "useLoginV2", "false" + // NotificationSettingsV2 is disabled. To be released in conjunction with iOS/Web resValue "bool", "useNotificationSettingsV1", "true" resValue "bool", "useNotificationSettingsV2", "false" diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsGlobalNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsGlobalNotificationPreferenceFragment.kt index 7e6f51f0b6..b9ac089158 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsGlobalNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsGlobalNotificationPreferenceFragment.kt @@ -34,4 +34,3 @@ class VectorSettingsGlobalNotificationPreferenceFragment "SETTINGS_PUSH_RULE_MESSAGES_IN_E2E_GROUP_CHAT_PREFERENCE_KEY" to RuleIds.RULE_ID_ENCRYPTED ) } - diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt index 2bf0a7c0ed..b2a1d26fc8 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt @@ -19,7 +19,6 @@ package im.vector.app.features.settings import im.vector.app.R import org.matrix.android.sdk.api.pushrules.RuleIds - class VectorSettingsKeywordAndMentionsNotificationPreferenceFragment : VectorSettingsPushRuleNotificationPreferenceFragment() { diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPushRuleNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPushRuleNotificationPreferenceFragment.kt index 6683cf3038..705d90a8c9 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPushRuleNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPushRuleNotificationPreferenceFragment.kt @@ -138,5 +138,4 @@ abstract class VectorSettingsPushRuleNotificationPreferenceFragment } abstract val prefKeyToPushRuleId: Map - } diff --git a/vector/src/main/res/xml/vector_settings_notification_global.xml b/vector/src/main/res/xml/vector_settings_notification_global.xml index 70defb32c4..64d0c131b7 100644 --- a/vector/src/main/res/xml/vector_settings_notification_global.xml +++ b/vector/src/main/res/xml/vector_settings_notification_global.xml @@ -1,5 +1,5 @@ - + @@ -25,4 +25,4 @@ android:title="@string/settings_encrypted_group_messages" /> - \ No newline at end of file + \ No newline at end of file diff --git a/vector/src/main/res/xml/vector_settings_notification_mentions_and_keywords.xml b/vector/src/main/res/xml/vector_settings_notification_mentions_and_keywords.xml index 18de36cb52..be89c86cb1 100644 --- a/vector/src/main/res/xml/vector_settings_notification_mentions_and_keywords.xml +++ b/vector/src/main/res/xml/vector_settings_notification_mentions_and_keywords.xml @@ -1,5 +1,5 @@ - + @@ -20,4 +20,4 @@ android:title="@string/settings_messages_at_room" /> - \ No newline at end of file + \ No newline at end of file diff --git a/vector/src/main/res/xml/vector_settings_notification_other.xml b/vector/src/main/res/xml/vector_settings_notification_other.xml index ad2b5194f0..b15329635c 100644 --- a/vector/src/main/res/xml/vector_settings_notification_other.xml +++ b/vector/src/main/res/xml/vector_settings_notification_other.xml @@ -1,5 +1,5 @@ - + @@ -24,4 +24,4 @@ android:persistent="false" android:title="@string/settings_room_upgrades" /> - \ No newline at end of file + \ No newline at end of file From f0d5950b13e3c79966812ed284ee1f4e7056292d Mon Sep 17 00:00:00 2001 From: David Langley Date: Wed, 14 Jul 2021 11:59:00 +0100 Subject: [PATCH 06/49] fix unncessary reformatting and function description --- .../src/main/java/im/vector/app/core/di/FragmentModule.kt | 8 ++++---- ...ectorSettingsPushRuleNotificationPreferenceFragment.kt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vector/src/main/java/im/vector/app/core/di/FragmentModule.kt b/vector/src/main/java/im/vector/app/core/di/FragmentModule.kt index 7da26a3ea1..8580543022 100644 --- a/vector/src/main/java/im/vector/app/core/di/FragmentModule.kt +++ b/vector/src/main/java/im/vector/app/core/di/FragmentModule.kt @@ -387,13 +387,13 @@ interface FragmentModule { @Binds @IntoMap - @FragmentKey(VectorSettingsAdvancedNotificationPreferenceFragment::class) - fun bindVectorSettingsAdvancedNotificationPreferenceFragment(fragment: VectorSettingsAdvancedNotificationPreferenceFragment): Fragment + @FragmentKey(VectorSettingsNotificationsTroubleshootFragment::class) + fun bindVectorSettingsNotificationsTroubleshootFragment(fragment: VectorSettingsNotificationsTroubleshootFragment): Fragment @Binds @IntoMap - @FragmentKey(VectorSettingsNotificationsTroubleshootFragment::class) - fun bindVectorSettingsNotificationsTroubleshootFragment(fragment: VectorSettingsNotificationsTroubleshootFragment): Fragment + @FragmentKey(VectorSettingsAdvancedNotificationPreferenceFragment::class) + fun bindVectorSettingsAdvancedNotificationPreferenceFragment(fragment: VectorSettingsAdvancedNotificationPreferenceFragment): Fragment @Binds @IntoMap diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPushRuleNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPushRuleNotificationPreferenceFragment.kt index 705d90a8c9..9aa6bf2f9f 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPushRuleNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPushRuleNotificationPreferenceFragment.kt @@ -42,7 +42,7 @@ abstract class VectorSettingsPushRuleNotificationPreferenceFragment } /** - * Create a push rule with the updated required at index. + * Create a push rule with the updated checkbox status. * * @param status boolean checkbox status * @return a push rule with the updated flags From 73bf50b93c37f190725ff30990899e8f7346f95d Mon Sep 17 00:00:00 2001 From: David Langley Date: Tue, 27 Jul 2021 20:21:40 +0100 Subject: [PATCH 07/49] rename global -> default, address comments --- .../preference/VectorCheckboxPreference.kt | 2 +- ...sDefaultNotificationPreferenceFragment.kt} | 9 ++++--- ...dMentionsNotificationPreferenceFragment.kt | 3 +-- ...ingsOtherNotificationPreferenceFragment.kt | 3 +-- ...sPushRuleNotificationPreferenceFragment.kt | 24 ++++++++++--------- vector/src/main/res/values/strings.xml | 2 +- ... vector_settings_notification_default.xml} | 2 +- .../res/xml/vector_settings_notifications.xml | 6 ++--- 8 files changed, 25 insertions(+), 26 deletions(-) rename vector/src/main/java/im/vector/app/features/settings/notifications/{VectorSettingsGlobalNotificationPreferenceFragment.kt => VectorSettingsDefaultNotificationPreferenceFragment.kt} (89%) rename vector/src/main/res/xml/{vector_settings_notification_global.xml => vector_settings_notification_default.xml} (94%) diff --git a/vector/src/main/java/im/vector/app/core/preference/VectorCheckboxPreference.kt b/vector/src/main/java/im/vector/app/core/preference/VectorCheckboxPreference.kt index b66ea77bdd..13b65e11b4 100644 --- a/vector/src/main/java/im/vector/app/core/preference/VectorCheckboxPreference.kt +++ b/vector/src/main/java/im/vector/app/core/preference/VectorCheckboxPreference.kt @@ -22,7 +22,7 @@ import android.widget.TextView import androidx.preference.CheckBoxPreference import androidx.preference.PreferenceViewHolder -open class VectorCheckboxPreference : CheckBoxPreference { +class VectorCheckboxPreference : CheckBoxPreference { // Note: @JvmOverload does not work here... constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsGlobalNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsDefaultNotificationPreferenceFragment.kt similarity index 89% rename from vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsGlobalNotificationPreferenceFragment.kt rename to vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsDefaultNotificationPreferenceFragment.kt index 7fe4c4b87d..7d6b74b093 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsGlobalNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsDefaultNotificationPreferenceFragment.kt @@ -19,15 +19,14 @@ package im.vector.app.features.settings.notifications import im.vector.app.R import org.matrix.android.sdk.api.pushrules.RuleIds -class VectorSettingsGlobalNotificationPreferenceFragment +class VectorSettingsDefaultNotificationPreferenceFragment : VectorSettingsPushRuleNotificationPreferenceFragment() { - override var titleRes: Int = R.string.settings_notification_global + override var titleRes: Int = R.string.settings_notification_default - override val preferenceXmlRes = R.xml.vector_settings_notification_global + override val preferenceXmlRes = R.xml.vector_settings_notification_default - override val prefKeyToPushRuleId: Map - get() = mapOf( + override val prefKeyToPushRuleId = mapOf( "SETTINGS_PUSH_RULE_MESSAGES_IN_ONE_TO_ONE_PREFERENCE_KEY" to RuleIds.RULE_ID_ONE_TO_ONE_ROOM, "SETTINGS_PUSH_RULE_MESSAGES_IN_GROUP_CHAT_PREFERENCE_KEY" to RuleIds.RULE_ID_ALL_OTHER_MESSAGES_ROOMS, "SETTINGS_PUSH_RULE_MESSAGES_IN_E2E_ONE_ONE_CHAT_PREFERENCE_KEY" to RuleIds.RULE_ID_ONE_TO_ONE_ENCRYPTED_ROOM, diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt index 149b176e09..37acc1d898 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt @@ -26,8 +26,7 @@ class VectorSettingsKeywordAndMentionsNotificationPreferenceFragment override val preferenceXmlRes = R.xml.vector_settings_notification_mentions_and_keywords - override val prefKeyToPushRuleId: Map - get() = mapOf( + override val prefKeyToPushRuleId = mapOf( "SETTINGS_PUSH_RULE_CONTAINING_MY_DISPLAY_NAME_PREFERENCE_KEY" to RuleIds.RULE_ID_CONTAIN_DISPLAY_NAME, "SETTINGS_PUSH_RULE_CONTAINING_MY_USER_NAME_PREFERENCE_KEY" to RuleIds.RULE_ID_CONTAIN_USER_NAME, "SETTINGS_PUSH_RULE_MESSAGES_CONTAINING_AT_ROOM_PREFERENCE_KEY" to RuleIds.RULE_ID_ROOM_NOTIF diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsOtherNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsOtherNotificationPreferenceFragment.kt index db25d46e10..42203fb613 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsOtherNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsOtherNotificationPreferenceFragment.kt @@ -26,8 +26,7 @@ class VectorSettingsOtherNotificationPreferenceFragment override val preferenceXmlRes = R.xml.vector_settings_notification_other - override val prefKeyToPushRuleId: Map - get() = mapOf( + override val prefKeyToPushRuleId = mapOf( "SETTINGS_PUSH_RULE_INVITED_TO_ROOM_PREFERENCE_KEY" to RuleIds.RULE_ID_INVITE_ME, "SETTINGS_PUSH_RULE_CALL_INVITATIONS_PREFERENCE_KEY" to RuleIds.RULE_ID_CALL, "SETTINGS_PUSH_RULE_MESSAGES_SENT_BY_BOT_PREFERENCE_KEY" to RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS, diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsPushRuleNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsPushRuleNotificationPreferenceFragment.kt index 4e3d8692b7..7f5ed0084d 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsPushRuleNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsPushRuleNotificationPreferenceFragment.kt @@ -31,16 +31,7 @@ import org.matrix.android.sdk.api.pushrules.rest.PushRuleAndKind abstract class VectorSettingsPushRuleNotificationPreferenceFragment : VectorSettingsBaseFragment() { - /** - * @return the bing rule status boolean - */ - fun ruleStatusIndexFor(ruleAndKind: PushRuleAndKind): Boolean { - val rule = ruleAndKind.pushRule - if (rule.ruleId == RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS) { - return rule.shouldNotify() || rule.shouldNotNotify() && !rule.enabled - } - return rule.enabled && !rule.shouldNotNotify() - } + abstract val prefKeyToPushRuleId: Map /** * Create a push rule with the updated checkbox status. @@ -90,6 +81,18 @@ abstract class VectorSettingsPushRuleNotificationPreferenceFragment } } + /** + * @return the bing rule status boolean + */ + private fun ruleStatusIndexFor(ruleAndKind: PushRuleAndKind): Boolean { + val rule = ruleAndKind.pushRule + if (rule.ruleId == RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS) { + return rule.shouldNotify() || rule.shouldNotNotify() && !rule.enabled + } + return rule.enabled && !rule.shouldNotNotify() + } + + override fun bindPref() { for (preferenceKey in prefKeyToPushRuleId.keys) { val preference = findPreference(preferenceKey)!! @@ -139,5 +142,4 @@ abstract class VectorSettingsPushRuleNotificationPreferenceFragment listView?.adapter?.notifyDataSetChanged() } - abstract val prefKeyToPushRuleId: Map } diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index 38a2c21f0c..3ead8b009e 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -1087,7 +1087,7 @@ Advanced Notification Settings Notification importance by event - Global Notifications + Default Notifications Mentions and Keywords Other diff --git a/vector/src/main/res/xml/vector_settings_notification_global.xml b/vector/src/main/res/xml/vector_settings_notification_default.xml similarity index 94% rename from vector/src/main/res/xml/vector_settings_notification_global.xml rename to vector/src/main/res/xml/vector_settings_notification_default.xml index 64d0c131b7..fb565d2230 100644 --- a/vector/src/main/res/xml/vector_settings_notification_global.xml +++ b/vector/src/main/res/xml/vector_settings_notification_default.xml @@ -1,7 +1,7 @@ Date: Tue, 27 Jul 2021 20:36:41 +0100 Subject: [PATCH 08/49] fic towncrier text --- changelog.d/3646.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/3646.feature b/changelog.d/3646.feature index ba2e870052..c44a5fa58f 100644 --- a/changelog.d/3646.feature +++ b/changelog.d/3646.feature @@ -1 +1 @@ -Reorganise Advanced Notifications in to Global Notifications, Keywords and Mentions, Other (This feature is hidden in the release ui until a future release date.) \ No newline at end of file +Reorganise Advanced Notifications in to Default Notifications, Keywords and Mentions, Other (This feature is hidden in the release ui until a future release date.) \ No newline at end of file From 7405d501f6d7020abefce27e301309d834c55608 Mon Sep 17 00:00:00 2001 From: David Langley Date: Tue, 27 Jul 2021 20:38:13 +0100 Subject: [PATCH 09/49] lint --- .../app/features/settings/notifications/NotificationIndex.kt | 1 - .../app/features/settings/notifications/PushRuleDefinitions.kt | 2 -- 2 files changed, 3 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/NotificationIndex.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/NotificationIndex.kt index 678a4e14c2..10bf6f7762 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/NotificationIndex.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/NotificationIndex.kt @@ -39,7 +39,6 @@ val PushRule.notificationIndex: NotificationIndex? get() = ruleMatches(this, targetRule) } - private fun ruleMatches(rule: PushRule, targetRule: PushRule): Boolean { // Rules match if both are disabled, or if both are enabled and their highlight/sound/notify actions match up. return (!rule.enabled && !targetRule.enabled) diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/PushRuleDefinitions.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/PushRuleDefinitions.kt index f3bac188a2..dd9077508e 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/PushRuleDefinitions.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/PushRuleDefinitions.kt @@ -17,8 +17,6 @@ package im.vector.app.features.settings.notifications import org.matrix.android.sdk.api.pushrules.RuleIds -import org.matrix.android.sdk.api.pushrules.rest.PushRule -import org.matrix.android.sdk.api.pushrules.toJson fun getStandardAction(ruleId: String, index: NotificationIndex): StandardActions? { return when (ruleId) { From 886bd3cc8f06b097723702e5aac849ef70556acb Mon Sep 17 00:00:00 2001 From: David Langley Date: Wed, 28 Jul 2021 09:34:15 +0100 Subject: [PATCH 10/49] lint --- .../VectorSettingsPushRuleNotificationPreferenceFragment.kt | 2 -- 1 file changed, 2 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsPushRuleNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsPushRuleNotificationPreferenceFragment.kt index 7f5ed0084d..8019ac4f53 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsPushRuleNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsPushRuleNotificationPreferenceFragment.kt @@ -92,7 +92,6 @@ abstract class VectorSettingsPushRuleNotificationPreferenceFragment return rule.enabled && !rule.shouldNotNotify() } - override fun bindPref() { for (preferenceKey in prefKeyToPushRuleId.keys) { val preference = findPreference(preferenceKey)!! @@ -141,5 +140,4 @@ abstract class VectorSettingsPushRuleNotificationPreferenceFragment private fun refreshDisplay() { listView?.adapter?.notifyDataSetChanged() } - } From a5cc0f98abc5a38a69cef0c103aae087fc1fd946 Mon Sep 17 00:00:00 2001 From: lvre <7uu3qrbvm@relay.firefox.com> Date: Sun, 8 Aug 2021 19:46:49 +0000 Subject: [PATCH 11/49] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (27 of 27 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/pt_BR/ --- fastlane/metadata/android/pt-BR/changelogs/40101150.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 fastlane/metadata/android/pt-BR/changelogs/40101150.txt diff --git a/fastlane/metadata/android/pt-BR/changelogs/40101150.txt b/fastlane/metadata/android/pt-BR/changelogs/40101150.txt new file mode 100644 index 0000000000..3be1d63d46 --- /dev/null +++ b/fastlane/metadata/android/pt-BR/changelogs/40101150.txt @@ -0,0 +1,2 @@ +Principais mudanças nesta versão: implementação de mensagem de voz em configurações labs. +Changelog completo: https://github.com/vector-im/element-android/releases/tag/v1.1.15 From 361178ba50562f90096278072c8fb0c5e0b21158 Mon Sep 17 00:00:00 2001 From: lvre <7uu3qrbvm@relay.firefox.com> Date: Sun, 8 Aug 2021 20:03:09 +0000 Subject: [PATCH 12/49] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (2552 of 2552 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/ --- vector/src/main/res/values-pt-rBR/strings.xml | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-pt-rBR/strings.xml b/vector/src/main/res/values-pt-rBR/strings.xml index ee499914c4..55f1acfc40 100644 --- a/vector/src/main/res/values-pt-rBR/strings.xml +++ b/vector/src/main/res/values-pt-rBR/strings.xml @@ -2743,7 +2743,7 @@ Limite de upload de arquivo do servidor Qualquer pessoa num espaço com esta sala pode encontrá-la e juntar-se a ela. Somente admins desta sala podem adicioná-la a um espaço. - Espaços + Membros de espaço somente Qualquer pessoa pode encontrar a sala e juntar-se Pública Somente pessoas convidadas podem encontrar e juntar-se @@ -2918,4 +2918,36 @@ Chamadad de áudio perdida %d chamadas de áudio perdidas + Por favor note que fazer upgrade vai fazer uma nova versão da sala. Todas as mensagens atuais vão permanecer nesta sala arquivada. + Qualquer pessoa em um espaço pai vai ser capaz de encontrar e juntar-se a esta sala - não precisa convidar manualmente todo mundo. Você vai ser capaz de mudar isto em configurações de sala a qualquer hora. + Qualquer pessoa em %s vai ser capaz de encontrar e juntar-se a esta sala - não precisa convidar todo mundo. Você vai ser capaz de mudar isto em configurações de sala a qualquer hora. + Mensagem de Voz (%1$s) + Não dá para responder ou editar enquanto mensagem de voz está ativa + Não dá para gravar uma mensagem de voz + Não dá para tocar esta mensagem de voz + Habilitar mensagem de voz + Toque em sua gravação para parar ou escutar + %1$ds restando + Segure para gravar, solte para enviar + Deletar mensagem de voz gravada + Gravando mensagem de voz + Pausar Mensagem de Voz + Tocar Mensagem de Voz + Cadeado de Mensagem de Voz + Deslize para cancelar + Começar Mensagem de Voz + Permitir qualquer pessoa em %s a encontrar e acessar. Você pode selecionar outros espaços também. + Upgrade Requerido + Voz + Outros espaços ou salas que você poderia não saber + Espaço que você sabe que contém esta sala + Decida quem pode encontrar e juntar-se a esta sala. + Toque para editar espaços + Selecionar espaços + Decida que espaços podem acessar esta sala. Se um espaço é selecionado seus membros vão ser capazes de encontrar e juntar-se a Nome de sala. + Espaços que podem acessar + Permitir membros de espaço a encontrar e acessar. + Membros de Escpaço %s podem encontrar, previsualizar e juntar-se. + Privada (Convite Somente) + Para enviar mensagens de voz, por favor conceda a permissão Microfone. \ No newline at end of file From 756ff3d93805f79ec50467ffb4ac5ae4001d2241 Mon Sep 17 00:00:00 2001 From: David Langley Date: Tue, 10 Aug 2021 10:54:13 +0100 Subject: [PATCH 13/49] cleanup unused code and add comments for clarity --- .../notifications/NotificationIndex.kt | 7 +++ ...sAdvancedNotificationPreferenceFragment.kt | 1 - ...sPushRuleNotificationPreferenceFragment.kt | 63 ------------------- 3 files changed, 7 insertions(+), 64 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/NotificationIndex.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/NotificationIndex.kt index 10bf6f7762..27f9302c45 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/NotificationIndex.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/NotificationIndex.kt @@ -29,6 +29,10 @@ enum class NotificationIndex(val index: Int) { } } +/** + * Given a push rule determine the NotificationIndex by comparing it to the static push rule definitions. + * Used when determining the selected state of the PushRulePreference. + */ val PushRule.notificationIndex: NotificationIndex? get() = NotificationIndex.values().firstOrNull { // Get the actions for the index @@ -39,6 +43,9 @@ val PushRule.notificationIndex: NotificationIndex? get() = ruleMatches(this, targetRule) } +/** + * A check to determine if two push rules should be considered a match. + */ private fun ruleMatches(rule: PushRule, targetRule: PushRule): Boolean { // Rules match if both are disabled, or if both are enabled and their highlight/sound/notify actions match up. return (!rule.enabled && !targetRule.enabled) diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsAdvancedNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsAdvancedNotificationPreferenceFragment.kt index 5ffb4d854d..93a788f528 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsAdvancedNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsAdvancedNotificationPreferenceFragment.kt @@ -38,7 +38,6 @@ class VectorSettingsAdvancedNotificationPreferenceFragment @Inject constructor() for (preferenceKey in prefKeyToPushRuleId.keys) { val preference = findPreference(preferenceKey) if (preference is PushRulePreference) { - // preference.isEnabled = null != rules && isConnected && pushManager.areDeviceNotificationsAllowed() val ruleAndKind: PushRuleAndKind? = session.getPushRules().findDefaultRule(prefKeyToPushRuleId[preferenceKey]) if (ruleAndKind == null) { diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsPushRuleNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsPushRuleNotificationPreferenceFragment.kt index 8019ac4f53..6f28876e1d 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsPushRuleNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsPushRuleNotificationPreferenceFragment.kt @@ -22,10 +22,6 @@ import im.vector.app.core.preference.VectorCheckboxPreference import im.vector.app.core.utils.toast import im.vector.app.features.settings.VectorSettingsBaseFragment import kotlinx.coroutines.launch -import org.matrix.android.sdk.api.pushrules.Action -import org.matrix.android.sdk.api.pushrules.RuleIds -import org.matrix.android.sdk.api.pushrules.RuleSetKey -import org.matrix.android.sdk.api.pushrules.rest.PushRule import org.matrix.android.sdk.api.pushrules.rest.PushRuleAndKind abstract class VectorSettingsPushRuleNotificationPreferenceFragment @@ -33,65 +29,6 @@ abstract class VectorSettingsPushRuleNotificationPreferenceFragment abstract val prefKeyToPushRuleId: Map - /** - * Create a push rule with the updated checkbox status. - * - * @param status boolean checkbox status - * @return a push rule with the updated flags - */ - fun createNewRule(ruleAndKind: PushRuleAndKind, status: Boolean): PushRule { - val safeRule = ruleAndKind.pushRule - val safeKind = ruleAndKind.kind - val ruleStatusIndex = ruleStatusIndexFor(ruleAndKind) - - return if (status != ruleStatusIndex) { - if (safeRule.ruleId == RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS) { - if (status) { - safeRule.copy(enabled = true) - .setNotify(true) - .setNotificationSound() - } else { - safeRule.copy(enabled = true) - .setNotify(false) - .removeNotificationSound() - } - } else { - if (status) { - safeRule.copy(enabled = true) - .setNotify(true) - .setHighlight(safeKind != RuleSetKey.UNDERRIDE - && safeRule.ruleId != RuleIds.RULE_ID_INVITE_ME) - .setNotificationSound( - if (safeRule.ruleId == RuleIds.RULE_ID_CALL) { - Action.ACTION_OBJECT_VALUE_VALUE_RING - } else { - Action.ACTION_OBJECT_VALUE_VALUE_DEFAULT - } - ) - } else { - if (safeKind == RuleSetKey.UNDERRIDE || safeRule.ruleId == RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS) { - safeRule.setNotify(false) - } else { - safeRule.copy(enabled = false) - } - } - } - } else { - safeRule - } - } - - /** - * @return the bing rule status boolean - */ - private fun ruleStatusIndexFor(ruleAndKind: PushRuleAndKind): Boolean { - val rule = ruleAndKind.pushRule - if (rule.ruleId == RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS) { - return rule.shouldNotify() || rule.shouldNotNotify() && !rule.enabled - } - return rule.enabled && !rule.shouldNotNotify() - } - override fun bindPref() { for (preferenceKey in prefKeyToPushRuleId.keys) { val preference = findPreference(preferenceKey)!! From bf9a22c1b03cc87946deeeaeae466256a77fa2b4 Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Tue, 10 Aug 2021 13:59:39 +0300 Subject: [PATCH 14/49] Fix flickering lock view. --- .../home/room/detail/composer/VoiceMessageRecorderView.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt index 48195dc8f1..00ab67656c 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt @@ -220,6 +220,9 @@ class VoiceMessageRecorderView @JvmOverloads constructor( } RecordingState.STARTED -> { showRecordingViews() + val translationAmount = distanceX.coerceAtMost(distanceToCancel) + views.voiceMessageMicButton.translationX = -translationAmount * rtlXMultiplier + views.voiceMessageSlideToCancel.translationX = -translationAmount / 2 * rtlXMultiplier } RecordingState.NONE -> Timber.d("VoiceMessageRecorderView shouldn't be in NONE state while moving.") RecordingState.PLAYBACK -> Timber.d("VoiceMessageRecorderView shouldn't be in PLAYBACK state while moving.") @@ -235,7 +238,7 @@ class VoiceMessageRecorderView @JvmOverloads constructor( if (recordingState == RecordingState.STARTED) { // Determine if cancelling or locking for the first move action. if (((currentX < firstX && rtlXMultiplier == 1) || (currentX > firstX && rtlXMultiplier == -1)) - && distanceX > distanceY) { + && distanceX > distanceY && distanceX > lastDistanceX) { recordingState = RecordingState.CANCELLING } else if (currentY < firstY && distanceY > distanceX) { recordingState = RecordingState.LOCKING From a0730943b494bca4ca97c35aeddbce001ab36b79 Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Tue, 10 Aug 2021 14:17:33 +0300 Subject: [PATCH 15/49] Dynamically set content description of play/pause button. --- .../home/room/detail/composer/VoiceMessageRecorderView.kt | 2 ++ .../home/room/detail/timeline/item/MessageVoiceItem.kt | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt index 00ab67656c..50d8d8e867 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt @@ -510,12 +510,14 @@ class VoiceMessageRecorderView @JvmOverloads constructor( } is VoiceMessagePlaybackTracker.Listener.State.Playing -> { views.voicePlaybackControlButton.setImageResource(R.drawable.ic_play_pause_pause) + views.voicePlaybackControlButton.contentDescription = context.getString(R.string.a11y_pause_voice_message) val formattedTimerText = DateUtils.formatElapsedTime((state.playbackTime / 1000).toLong()) views.voicePlaybackTime.text = formattedTimerText } is VoiceMessagePlaybackTracker.Listener.State.Paused, is VoiceMessagePlaybackTracker.Listener.State.Idle -> { views.voicePlaybackControlButton.setImageResource(R.drawable.ic_play_pause_play) + views.voicePlaybackControlButton.contentDescription = context.getString(R.string.a11y_play_voice_message) } } } diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageVoiceItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageVoiceItem.kt index dc204da291..fb7d0cabd5 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageVoiceItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageVoiceItem.kt @@ -71,6 +71,7 @@ abstract class MessageVoiceItem : AbsMessageItem() { contentUploadStateTrackerBinder.bind(attributes.informationData.eventId, izLocalFile, holder.progressLayout) } else { holder.voicePlaybackControlButton.setImageResource(R.drawable.ic_cross) + holder.voicePlaybackControlButton.contentDescription = holder.view.context.getString(R.string.error_voice_message_unable_to_play) holder.progressLayout.isVisible = false } @@ -98,16 +99,19 @@ abstract class MessageVoiceItem : AbsMessageItem() { private fun renderIdleState(holder: Holder) { holder.voicePlaybackControlButton.setImageResource(R.drawable.ic_play_pause_play) + holder.voicePlaybackControlButton.contentDescription = holder.view.context.getString(R.string.a11y_play_voice_message) holder.voicePlaybackTime.text = formatPlaybackTime(duration) } private fun renderPlayingState(holder: Holder, state: VoiceMessagePlaybackTracker.Listener.State.Playing) { holder.voicePlaybackControlButton.setImageResource(R.drawable.ic_play_pause_pause) + holder.voicePlaybackControlButton.contentDescription = holder.view.context.getString(R.string.a11y_pause_voice_message) holder.voicePlaybackTime.text = formatPlaybackTime(state.playbackTime) } private fun renderPausedState(holder: Holder, state: VoiceMessagePlaybackTracker.Listener.State.Paused) { holder.voicePlaybackControlButton.setImageResource(R.drawable.ic_play_pause_play) + holder.voicePlaybackControlButton.contentDescription = holder.view.context.getString(R.string.a11y_play_voice_message) holder.voicePlaybackTime.text = formatPlaybackTime(state.playbackTime) } From bf1db5dcf9af1f8591627e4495ec8927aa8eee3e Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Tue, 10 Aug 2021 14:36:01 +0300 Subject: [PATCH 16/49] Remove content description of mic button if it is not visible. --- .../room/detail/composer/VoiceMessageRecorderView.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt index 50d8d8e867..033020bbce 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt @@ -20,6 +20,7 @@ import android.content.Context import android.text.format.DateUtils import android.util.AttributeSet import android.view.MotionEvent +import android.view.View import androidx.constraintlayout.widget.ConstraintLayout import androidx.core.view.isInvisible import androidx.core.view.isVisible @@ -87,6 +88,15 @@ class VoiceMessageRecorderView @JvmOverloads constructor( initListeners() } + override fun onVisibilityChanged(changedView: View, visibility: Int) { + super.onVisibilityChanged(changedView, visibility) + if (changedView == this && visibility == VISIBLE) { + views.voiceMessageMicButton.contentDescription = context.getString(R.string.a11y_start_voice_message) + } else { + views.voiceMessageMicButton.contentDescription = "" + } + } + fun initVoiceRecordingViews() { recordingState = RecordingState.NONE From 296a1c47702a5228c612df2c98c02e01bc75208f Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Tue, 10 Aug 2021 14:43:16 +0300 Subject: [PATCH 17/49] Vibrate when the recording is canceled. --- .../home/room/detail/composer/VoiceMessageRecorderView.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt index 033020bbce..f059d4285e 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt @@ -428,6 +428,10 @@ class VoiceMessageRecorderView @JvmOverloads constructor( if (recordingState == RecordingState.CANCELLED || recordingState == RecordingState.NONE) { hideToast() } + + if (isCancelled.orFalse()) { + vibrate(context) + } } private fun resetMicButtonUi() { From 0cd0484b41bd714502a063ca516ce7722f3c8a3e Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Tue, 10 Aug 2021 14:54:03 +0300 Subject: [PATCH 18/49] Fix flickering between locking states. --- .../home/room/detail/composer/VoiceMessageRecorderView.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt index f059d4285e..96a066b295 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt @@ -250,7 +250,7 @@ class VoiceMessageRecorderView @JvmOverloads constructor( if (((currentX < firstX && rtlXMultiplier == 1) || (currentX > firstX && rtlXMultiplier == -1)) && distanceX > distanceY && distanceX > lastDistanceX) { recordingState = RecordingState.CANCELLING - } else if (currentY < firstY && distanceY > distanceX) { + } else if (currentY < firstY && distanceY > distanceX && distanceY > lastDistanceY) { recordingState = RecordingState.LOCKING } } else if (recordingState == RecordingState.CANCELLING) { From 61304709ac93d614cad24eb3a5166841eec6b069 Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Sun, 8 Aug 2021 20:28:14 +0000 Subject: [PATCH 19/49] Translated using Weblate (Czech) Currently translated at 100.0% (2552 of 2552 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/cs/ --- vector/src/main/res/values-cs/strings.xml | 34 ++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-cs/strings.xml b/vector/src/main/res/values-cs/strings.xml index 6686684cae..5e8a852562 100644 --- a/vector/src/main/res/values-cs/strings.xml +++ b/vector/src/main/res/values-cs/strings.xml @@ -2794,7 +2794,7 @@ Založit prostor Hledat jméno Kdokoli v prostoru s touto místností ji může nalézt a vstoupit. Jen správci místnosti ji mohou připojit k prostoru. - Prostory + Pouze členové prostoru Kdokoli může místnost nalézt a vstoupit Veřejná Pouze pozvaní mohou místnost nalézt a vstoupit @@ -2903,4 +2903,36 @@ %d zmeškané hlasové hovory %d zmeškaných hlasových hovorů + Rozhodněte, které prostory mají přístup do této místnosti. Pokud je vybrán prostor, jeho členové budou moci najít název místnosti a připojit se k ní. + Další prostory nebo místnosti, které možná neznáte + Prostor, o kterém víte, že obsahuje tuto místnost + Rozhodněte, kdo může tuto místnost najít a připojit se k ní. + Klepnutím upravíte prostory + Povolit vyhledání a přístup komukoli v %s. Můžete vybrat i další prostory. + Vyžadována aktualizace + Každý, kdo se nachází v nadřazeném prostoru, bude moci tuto místnost najít a připojit se k ní - není třeba všechny zvát ručně. Tuto možnost budete moci kdykoli změnit v nastavení místnosti. + Kdokoli v %s bude moci tuto místnost najít a připojit se k ní - není třeba všechny zvát ručně. Toto nastavení budete moci kdykoli změnit v nastavení místnosti. + Klepnutím na nahrávku ji zastavíte nebo posloucháte + Vybrat prostory + Upozorňujeme, že aktualizací vznikne nová verze místnosti. Všechny aktuální zprávy zůstanou v této archivované místnosti. + Hlasová zpráva (%1$s) + Nelze odpovídat ani upravovat, když je hlasová zpráva aktivní + Nelze nahrát hlasovou zprávu + Nelze přehrát tuto hlasovou zprávu + Povolit hlasovou zprávu + %1$ds zbývá + Podržením nahrajte, uvolněním odešlete + Odstranit nahranou hlasovou zprávu + Nahrát hlasovou zprávu + Pozastavit hlasovou zprávu + Přehrát hlasovou zprávu + Zámek hlasové zprávy + Posunutím zrušíte + Zahájení hlasové zprávy + Hlasová zpráva + Prostory, které mají přístup + Umožněte členům prostoru ho najít a zpřístupnit. + Členové prostoru %s mohou vyhledávat, prohlížet a připojovat se. + Soukromé (pouze pro pozvané) + Chcete-li odesílat hlasové zprávy, povolte oprávnění mikrofonu. \ No newline at end of file From aa24e484ee2a1c5133fb84880b78617a1c18bf3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Sun, 8 Aug 2021 20:49:33 +0000 Subject: [PATCH 20/49] Translated using Weblate (Estonian) Currently translated at 99.2% (2532 of 2552 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/et/ --- vector/src/main/res/values-et/strings.xml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-et/strings.xml b/vector/src/main/res/values-et/strings.xml index c5f7234fc9..f1fe015df8 100644 --- a/vector/src/main/res/values-et/strings.xml +++ b/vector/src/main/res/values-et/strings.xml @@ -2741,7 +2741,7 @@ Pole kontrollitud Otsi nime alusel Kõik sellise kogukonnakeskuse liikmed, kuhu see jututuba kuulub, võivad seda leida ja temaga liituda. Ainult selle jututoa haldajad võivad teda kogukonnakeskusesse liita. - Kogukonnakeskused + Vaid kogukonna liikmetele Kõik võivad jututuba leida ja sellega liituda Avalik Jututuba saab leida ja sellega liituda vaid kutsete alusel @@ -2848,4 +2848,16 @@ Vastamata kõne %d vastamata kõnet + Vajalik on uuendus + Muud kogukonnad ja jututoad, mida sa ei pruugi teada + Sulle teadaolevad kogukonnad, milles osaleb see jututuba + %s kogukonna liikmed saavad leida, vaadata eelvaadet ja liituda. + Vali kes saavad seda kogukonda leida ja võivad temaga liituda. + Kogukondade muutmiseks klõpsi + Vali kogukonnad + Vali mis kogukonnad pääsevad ligi sellele jututoale. Valitud kogukonna liikmed saavad seda jututuba leida ja temaga liituda. + Kogukonnad, mis pääsevad ligi + Luba kogukonna liikmetel leida ja vaadata. + Privaatne (vaid kutse alusel) + Häälsõnumite saatmiseks palun anna rakendusele õigus mikrofoni kasutada. \ No newline at end of file From 5f65a428555dafb2ab9ef16cfb54975ada3311ff Mon Sep 17 00:00:00 2001 From: Glandos Date: Mon, 9 Aug 2021 11:51:43 +0000 Subject: [PATCH 21/49] Translated using Weblate (French) Currently translated at 100.0% (2552 of 2552 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/fr/ --- vector/src/main/res/values-fr/strings.xml | 34 ++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-fr/strings.xml b/vector/src/main/res/values-fr/strings.xml index beadfd804f..ff4d325bda 100644 --- a/vector/src/main/res/values-fr/strings.xml +++ b/vector/src/main/res/values-fr/strings.xml @@ -2692,7 +2692,7 @@ Décoché Rechercher par nom Tout membre d’un espace contenant ce salon peut le trouver et le rejoindre. Seuls les administrateurs de ce salon peuvent l’ajouter à un espace. - Espaces + Seulement pour les membres de l\'espace Tout le monde peut trouver ce salon et le rejoindre Public Seules les personnes invitées peuvent le trouver et le rejoindre @@ -2855,4 +2855,36 @@ Permissions manquantes Pour effectuer cette action, veuillez autoriser la permission Caméra depuis les réglages système. Certaines permissions manquent pour effectuer cette action, veuillez autoriser ces permissions depuis les réglages système. + Veuillez noter que la mise-à-jour créera une nouvelle version de ce salon. Tous les messages existants seront conservés dans ce salon archivé. + Quiconque dans l’espace parent pourra trouver et rejoindre ce salon – pas besoin d’inviter les gens un par un. Vous pourrez changer cela à n’importe quel moment dans les réglages du salon. + Quiconque dans %s pourra trouver et rejoindre ce salon – pas besoin d’inviter les gens un par un. Vous pourrez changer cela à n’importe quel moment dans les réglages du salon. + Message vocal (%1$s) + Impossible de répondre ou d’éditer tant qu’un message vocal est actif + Impossible d’enregistrer un message vocal + Impossible de lire ce message vocal + Activer les messages vocaux + Touchez l’enregistrement pour l’arrêter ou l’écouter + %1$ds restant + Maintenir pour enregistrer, relâcher pour envoyer + Supprimer l’enregistrement du message vocal + Enregistrement du message vocal + Mettre en pause le message vocal + Lire le message vocal + Verrou de message vocal + Glisser pour annuler + Démarrer un message vocal + Autoriser quiconque dans %s à trouver et venir. Vous pouvez également sélectionner d’autres espaces. + Mise-à-jour nécessaire + Vocal + Autres espaces ou salons que vous ne connaissez peut-être pas + Espace que vous connaissez dont ce salon fait partie + Choisir qui peut trouver et rejoindre ce salon. + Toucher pour modifier les espaces + Sélectionner des espaces + Choisir les espaces pouvant accéder à ce salon. Si un espace est sélectionné, ces membres pourront trouver et rejoindre le salon. + Espaces pouvant accéder + Autoriser les membres de l’espace à trouver et venir. + Les membres de l’espace %s peuvent trouver, prévisualiser et venir. + Privé (seulement sur invitation) + Pour envoyer des messages vocaux, veuillez accorder la permission Microphone. \ No newline at end of file From 201552e12b1932c657768ddf9fdf1f34186a0a6d Mon Sep 17 00:00:00 2001 From: random Date: Mon, 9 Aug 2021 09:11:36 +0000 Subject: [PATCH 22/49] Translated using Weblate (Italian) Currently translated at 99.8% (2549 of 2552 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/it/ --- vector/src/main/res/values-it/strings.xml | 34 ++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-it/strings.xml b/vector/src/main/res/values-it/strings.xml index f91d02e45d..c4737ac5ce 100644 --- a/vector/src/main/res/values-it/strings.xml +++ b/vector/src/main/res/values-it/strings.xml @@ -2795,7 +2795,7 @@ Deselezionato Cerca nome Chiunque in uno Spazio con questa stanza può trovarla ed entrarci. Solo gli amministratori della stanza possono aggiungerla ad uno Spazio. - Spazi + Spazio solo per membri Chiunque può trovarla ed entrare Pubblica Solo le persone invitate possono trovarla ed entrare @@ -2902,4 +2902,36 @@ Telefonata persa %d telefonate perse + Nota che aggiornare creerà una nuova versione della stanza. Tutti i messaggi attuali resteranno in questa stanza archiviata. + Chiunque in uno spazio superiore potrà trovare ed entrare in questa stanza - non serve invitare a mano tutti. Potrai cambiare questa cosa nelle impostazioni della stanza in qualsiasi momento. + Chiunque in %s potrà trovare ed entrare in questa stanza - non serve invitare a mano tutti. Potrai cambiare questa cosa nelle impostazioni della stanza in qualsiasi momento. + Messaggio vocale (%1$s) + Impossibile rispondere o modificare mentre un messaggio vocale è attivo + Impossibile registrare un messaggio vocale + Impossibile riprodurre questo messaggio vocale + Attiva messaggio vocale + Tocca la registrazione per fermare o ascoltare + %1$ds rimasti + Tieni premuto per registrare, rilascia per inviare + Elimina messaggio vocale registrato + Registrazione messaggio vocale + Pausa messaggio vocale + Inizia messaggio vocale + Riproduci messaggio vocale + Blocco messaggio vocale + Scorri per annullare + Permetti a chiunque in %s di trovare ed accedere. Puoi selezionare anche altri spazi. + Aggiornamento necessario + Vocale + Altri spazi o stanze che potresti non conoscere + Spazi di cui sai che contengono questa stanza + Decidi chi può trovare ed entrare in questa stanza. + Tocca per modificare gli spazi + Seleziona spazi + Decidi quali spazi possono accedere a questa stanza. Se uno spazio è selezionato, i suoi membri potranno trovare ed entrare nella stanza. + Spazi che possono accedere + Permetti ai membri dello spazio di trovare ed accedere. + I membri dello spazio %s possono trovare, vedere l\'anteprima ed entrare. + Privata (solo a invito) + Per inviare messaggi vocali, consenti l\'autorizzazione del microfono. \ No newline at end of file From e66123686c4343a5bf7a5c6ea55f76c681369397 Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Mon, 9 Aug 2021 11:15:16 +0000 Subject: [PATCH 23/49] Translated using Weblate (Albanian) Currently translated at 99.5% (2541 of 2552 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/sq/ --- vector/src/main/res/values-sq/strings.xml | 34 ++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-sq/strings.xml b/vector/src/main/res/values-sq/strings.xml index ea2bc85917..91d853cadb 100644 --- a/vector/src/main/res/values-sq/strings.xml +++ b/vector/src/main/res/values-sq/strings.xml @@ -2729,7 +2729,7 @@ Krijoni një Hapësirë Kërko Për Emër Cilido në një hapësirë me këtë dhomë mund ta kërkojë dhe hyjë në të. Vetëm përgjegjësit e kësaj dhome mund ta shtojnë te një hapësirë. - Hapësira + Vetëm anëtarë të hapësirës Kushdo mund ta gjejë dhomën dhe të hyjë në të Publike Vetëm personat e ftuar mund ta gjejnë dhe hyjnë në të @@ -2838,4 +2838,36 @@ Thirrje audio e humbur %d thirrje audio të humbura + Ju lutemi, kini parasysh se përmirësimi do të prodhojë një version të ri të dhomës. Krejt mesazhet e tanishëm do të mbeten në këtë dhomë të arkivuar. + Cilido në një hapësirë mëmë do të jetë në gjendje ta gjejë dhe hyjë në këtë dhomë - s’ka nevojë të ftohen dorazi një e nga një. Do të jeni në gjendje ta ndryshoni këtë te rregullimet e dhomës, në çfarëdo kohe. + Cilido te %s do të jetë në gjendje të gjejë dhe hyjë në këtë dhomë - s’ka nevojë të ftohen dorazi një e nga një. Do të jeni në gjendje ta ndryshoni këtë te rregullimet e kësaj dhome, në çfarëdo kohe. + Mesazh Zanor (%1$s) + S’mund të përgjigjet ose përpunohet, ndërkohë që mesazhi zanor është aktiv + S’incizohet dot një mesazh zanor + Ky mesazh zanor s’mund të luhet + Aktivizo mesazh zanor + Që ta ndalni ose ta dëgjoni, prekni mbi incizimin tuaj + Edhe %1$ds + Mbajeni, që të incizojë, lëshojeni që të dërgohet + Fshije mesazhin zanor të incizuar + Po incizohet mesazh zanor + Ndalni Mesazh Zanor + Luani Mesazh Zanor + Kyçje Mesazhi Zanor + Rrëshqiteni që të anulohet + Nisni Mesazh Zanor + Lejo cilindo te %s ta gjejë dhe hyjë. Mund të përzgjidhni edhe hapësira të tjera. + Lypset Domosdo Përmirësim + + Hapësira ose dhoma të tjera që mund të mos i dini + Hapësirë që e dini se përmban këtë dhomë + Vendosni se cilët mund të gjejnë dhe hyjnë në këtë dhomë. + Që të përpunoni hapësira, prekeni + Përzgjidhni hapësira + Vendosni se prej cilave hapësira mund të hyhet në këtë dhomë. Nëse përzgjidhet një hapësirë, anëtarët e saj do të mund ta gjejnë dhe hyjnë te emër Dhome. + Hapësira nga të cilat mund të hyhet + Lejo anëtarë hapësirash ta gjejnë dhe hyjnë. + Anëtarë të Hapësirës %s mund ta gjejnë, parashohin dhe hyjnë në të. + Private (Vetëm Me Ftesa) + Për të dërguar mesazhe zanorë, ju lutemi, akordoni leje Mikrofoni. \ No newline at end of file From e82dbc51817fd1356c75f0c8979ba1e4f3079969 Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Mon, 9 Aug 2021 19:00:59 +0000 Subject: [PATCH 24/49] Translated using Weblate (Swedish) Currently translated at 97.0% (2476 of 2552 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/sv/ --- vector/src/main/res/values-sv/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vector/src/main/res/values-sv/strings.xml b/vector/src/main/res/values-sv/strings.xml index d9b58bb605..900e439b07 100644 --- a/vector/src/main/res/values-sv/strings.xml +++ b/vector/src/main/res/values-sv/strings.xml @@ -2811,4 +2811,6 @@ \nVi kommer att förbättra detta som en del av betan, men ville låta dig veta. Lagkamratsutrymmen är inte riktigt färdiga men du kan ändå testa dem Fortsätt ändå + För att utföra detta, vänligen ge kameraåtkomst från systeminställningarna. + Vissa behörigheter saknas för att utföra detta, vänligen ge behörighet från systeminställningarna. \ No newline at end of file From 60ec09abb3648f6f3b7a0b7e9a57e0f235cef919 Mon Sep 17 00:00:00 2001 From: sr093906 Date: Mon, 9 Aug 2021 00:03:05 +0000 Subject: [PATCH 25/49] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (2552 of 2552 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hans/ --- vector/src/main/res/values-zh-rCN/strings.xml | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-zh-rCN/strings.xml b/vector/src/main/res/values-zh-rCN/strings.xml index 051cbc72b3..1a417db842 100644 --- a/vector/src/main/res/values-zh-rCN/strings.xml +++ b/vector/src/main/res/values-zh-rCN/strings.xml @@ -2708,7 +2708,7 @@ 离开当前的回忆并切换至其他会议? 抱歉,在尝试加入会议时发生了错误 所有在此空间中的人都可以找到并加入它。仅有此聊天室的管理员可以将其添加到空间中。 - 空间 + 仅空间成员 任何人都能找到聊天室并加入 公开 仅有被邀请的人才能找到并加入 @@ -2803,4 +2803,36 @@ %d 个未接音频电话 + 请注意,升级将使聊天室焕然一新。 所有当前消息都将保留在此存档的聊天室中。 + 主空间中的任何人都可以找到并加入此房间 - 无需手动邀请所有人。 您可以随时在聊天室设置中更改此设置。 + %s 中的任何人将可以查找并加入此房间 - 无需手动邀请所有人。 您可以随时在聊天室设置中更改此设置。 + 语音消息 (%1$s) + 语音消息处于活动状态时无法回复或编辑 + 无法录制语音消息 + 无法播放此语音消息 + 启用语音消息 + 点按您的录音以停止或收听 + 剩余 %1$d秒 + 按住录音,松开发送 + 删除录制的语音消息 + 录制语音消息 + 暂停语音消息 + 播放语音消息 + 语音消息锁 + 滑动取消 + 开始语音消息 + 允许 %s 中的任何人查找和访问。 您也可以选择其他空间。 + 需要升级 + 语音 + 您可能不知道的其他空间或聊天室 + 你知道的包含这个聊天室的空间 + 决定谁能找到并加入这个聊天室。 + 点按即可编辑空间 + 选择空间 + 决定哪些空间可以进入这个房间。 如果选择了一个空间,其成员将能够找到并加入房间名称。 + 可访问的空间 + 允许空间成员查找和访问。 + %s 空间的成员可找到、预览和加入。 + 私人(仅限邀请) + 要发送语音消息,请授予麦克风权限。 \ No newline at end of file From 3e06a02c7cc89247ddffbbd541cc47d9df418403 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Mon, 9 Aug 2021 01:38:39 +0000 Subject: [PATCH 26/49] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2552 of 2552 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hant/ --- vector/src/main/res/values-zh-rTW/strings.xml | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-zh-rTW/strings.xml b/vector/src/main/res/values-zh-rTW/strings.xml index e84e948d08..db87236cfc 100644 --- a/vector/src/main/res/values-zh-rTW/strings.xml +++ b/vector/src/main/res/values-zh-rTW/strings.xml @@ -2689,7 +2689,7 @@ 未檢查 搜尋名稱 擁有此聊天室空間中的任何人都可以尋找並加入。僅此聊天室的管理員可以將其新增到空間中。 - 空間 + 僅空間成員 任何人都可以尋找聊天室並加入 公開 僅被邀請的夥伴可以尋找並加入 @@ -2793,4 +2793,36 @@ %d 通未接聽通話 + 請注意,升級會讓聊天室變為新的版本。目前的所有訊息都將保留在此被封存的聊天室中。 + 上層空間中的任何人都可以找到並加入此聊天室,不需要手動邀請所有人。您隨時都可以在聊天室設定中變更此設定。 + 任何在 %s 中的人都可以找到並加入此聊天室,不需要手動邀請所有人。您隨時都可以在聊天室設定中變更此設定。 + 語音訊息 (%1$s) + 語音訊息作用中時無法回覆或編輯 + 無法錄製語音訊息 + 無法播放此語音訊息 + 啟用語音訊息 + 點擊您的錄音以停止或收聽 + 剩下%1$d秒 + 按住以錄製,放開以傳送 + 刪除已錄製的語音訊息 + 正在錄製語音訊息 + 暫停語音訊息 + 播放語音訊息 + 語音訊息鎖定 + 滑動以取消 + 開始語音訊息 + 允許任何在 %s 中的人都可以找到並存取。您也可以選取其他空間。 + 必須升級 + 語音 + 您可能不知道的其他空間或聊天室 + 您所知的包含此聊天是的空間 + 決定誰可以找到並加入此聊天室。 + 點擊以編輯空間 + 選取空間 + 決定哪些空間可以存取此聊天室。若選取了某個空間,其成員就可以找到並加入此聊天室。 + 可以存取的空間 + 允許空間成員尋找並存取。 + 空間 %s 的成員可以找到、預覽並加入。 + 私人(僅邀請) + 要傳送語音訊息,請授予「麥克風」權限。 \ No newline at end of file From 3373b7c265dc2f8c95c64abf09cc95c23d1af413 Mon Sep 17 00:00:00 2001 From: Glandos Date: Mon, 9 Aug 2021 11:56:32 +0000 Subject: [PATCH 27/49] Translated using Weblate (French) Currently translated at 100.0% (27 of 27 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/fr/ --- fastlane/metadata/android/fr-FR/changelogs/40101100.txt | 2 ++ fastlane/metadata/android/fr-FR/changelogs/40101110.txt | 2 ++ fastlane/metadata/android/fr-FR/changelogs/40101120.txt | 2 ++ fastlane/metadata/android/fr-FR/changelogs/40101130.txt | 2 ++ fastlane/metadata/android/fr-FR/changelogs/40101140.txt | 2 ++ fastlane/metadata/android/fr-FR/changelogs/40101150.txt | 2 ++ 6 files changed, 12 insertions(+) create mode 100644 fastlane/metadata/android/fr-FR/changelogs/40101100.txt create mode 100644 fastlane/metadata/android/fr-FR/changelogs/40101110.txt create mode 100644 fastlane/metadata/android/fr-FR/changelogs/40101120.txt create mode 100644 fastlane/metadata/android/fr-FR/changelogs/40101130.txt create mode 100644 fastlane/metadata/android/fr-FR/changelogs/40101140.txt create mode 100644 fastlane/metadata/android/fr-FR/changelogs/40101150.txt diff --git a/fastlane/metadata/android/fr-FR/changelogs/40101100.txt b/fastlane/metadata/android/fr-FR/changelogs/40101100.txt new file mode 100644 index 0000000000..610f7765d6 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/40101100.txt @@ -0,0 +1,2 @@ +Principaux changements pour cette version : rafraîchissement des styles et des thèmes, et nouvelles fonctionnalités pour les espaces. +Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.1.10 diff --git a/fastlane/metadata/android/fr-FR/changelogs/40101110.txt b/fastlane/metadata/android/fr-FR/changelogs/40101110.txt new file mode 100644 index 0000000000..5a5db82f07 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/40101110.txt @@ -0,0 +1,2 @@ +Principaux changements pour cette version : rafraîchissement des styles et des thèmes, et nouvelles fonctionnalités pour les espaces (correction for 1.1.10). +Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.1.11 diff --git a/fastlane/metadata/android/fr-FR/changelogs/40101120.txt b/fastlane/metadata/android/fr-FR/changelogs/40101120.txt new file mode 100644 index 0000000000..b75ec7d3fe --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/40101120.txt @@ -0,0 +1,2 @@ +Principaux changements pour cette version : rafraîchissement des styles et des thèmes, et correction d’un plantage après un appel vidéo. +Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.1.12 diff --git a/fastlane/metadata/android/fr-FR/changelogs/40101130.txt b/fastlane/metadata/android/fr-FR/changelogs/40101130.txt new file mode 100644 index 0000000000..7190eede74 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/40101130.txt @@ -0,0 +1,2 @@ +Principaux changements pour cette version : principalement des corrections de bogues et de stabilité. +Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.1.13 diff --git a/fastlane/metadata/android/fr-FR/changelogs/40101140.txt b/fastlane/metadata/android/fr-FR/changelogs/40101140.txt new file mode 100644 index 0000000000..ba1784b5fd --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/40101140.txt @@ -0,0 +1,2 @@ +Principaux changements pour cette version : correction d’un problème concernant les messages chiffrés. +Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.1.14 diff --git a/fastlane/metadata/android/fr-FR/changelogs/40101150.txt b/fastlane/metadata/android/fr-FR/changelogs/40101150.txt new file mode 100644 index 0000000000..559dcc1f6a --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/40101150.txt @@ -0,0 +1,2 @@ +Principaux changements pour cette version : ajout des messages vocaux dans les expérimentations. +Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.1.15 From 788503bb4dc32278dd0ee3d67c2ac3e5fd1de286 Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Mon, 9 Aug 2021 06:36:43 +0000 Subject: [PATCH 28/49] Translated using Weblate (Swedish) Currently translated at 100.0% (27 of 27 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/sv/ --- fastlane/metadata/android/sv-SE/changelogs/40101100.txt | 2 ++ fastlane/metadata/android/sv-SE/changelogs/40101110.txt | 2 ++ fastlane/metadata/android/sv-SE/changelogs/40101120.txt | 2 ++ fastlane/metadata/android/sv-SE/changelogs/40101130.txt | 2 ++ fastlane/metadata/android/sv-SE/changelogs/40101140.txt | 2 ++ fastlane/metadata/android/sv-SE/changelogs/40101150.txt | 2 ++ 6 files changed, 12 insertions(+) create mode 100644 fastlane/metadata/android/sv-SE/changelogs/40101100.txt create mode 100644 fastlane/metadata/android/sv-SE/changelogs/40101110.txt create mode 100644 fastlane/metadata/android/sv-SE/changelogs/40101120.txt create mode 100644 fastlane/metadata/android/sv-SE/changelogs/40101130.txt create mode 100644 fastlane/metadata/android/sv-SE/changelogs/40101140.txt create mode 100644 fastlane/metadata/android/sv-SE/changelogs/40101150.txt diff --git a/fastlane/metadata/android/sv-SE/changelogs/40101100.txt b/fastlane/metadata/android/sv-SE/changelogs/40101100.txt new file mode 100644 index 0000000000..bc7a6de663 --- /dev/null +++ b/fastlane/metadata/android/sv-SE/changelogs/40101100.txt @@ -0,0 +1,2 @@ +Huvudsakliga ändringar i den här versionen: tema- och stiluppdatering och nya funktioner för utrymmen. +Full ändringslogg: https://github.com/vector-im/element-android/releases/tag/v1.1.10 diff --git a/fastlane/metadata/android/sv-SE/changelogs/40101110.txt b/fastlane/metadata/android/sv-SE/changelogs/40101110.txt new file mode 100644 index 0000000000..176fd38769 --- /dev/null +++ b/fastlane/metadata/android/sv-SE/changelogs/40101110.txt @@ -0,0 +1,2 @@ +Huvudsakliga ändringar i den här versionen: tema- och stiluppdatering och nya funktioner för utrymmen (buggfix för 1.1.10). +Full ändringslogg: https://github.com/vector-im/element-android/releases/tag/v1.1.11 diff --git a/fastlane/metadata/android/sv-SE/changelogs/40101120.txt b/fastlane/metadata/android/sv-SE/changelogs/40101120.txt new file mode 100644 index 0000000000..aeef7814ee --- /dev/null +++ b/fastlane/metadata/android/sv-SE/changelogs/40101120.txt @@ -0,0 +1,2 @@ +Huvudsakliga ändringar i den här versionen: tema- och stiluppdatering och fixa en krasch efter videosamtal. +Full ändringslogg: https://github.com/vector-im/element-android/releases/tag/v1.1.12 diff --git a/fastlane/metadata/android/sv-SE/changelogs/40101130.txt b/fastlane/metadata/android/sv-SE/changelogs/40101130.txt new file mode 100644 index 0000000000..def96d7315 --- /dev/null +++ b/fastlane/metadata/android/sv-SE/changelogs/40101130.txt @@ -0,0 +1,2 @@ +Huvudsakliga ändringar i den här versionen: huvudsakligen stabilitets- och buggfixuppdatering. +Full ändringslogg: https://github.com/vector-im/element-android/releases/tag/v1.1.13 diff --git a/fastlane/metadata/android/sv-SE/changelogs/40101140.txt b/fastlane/metadata/android/sv-SE/changelogs/40101140.txt new file mode 100644 index 0000000000..96203647b9 --- /dev/null +++ b/fastlane/metadata/android/sv-SE/changelogs/40101140.txt @@ -0,0 +1,2 @@ +Huvudsakliga ändringar i den här versionen: fixa ett problem med krypterade meddelanden. +Full ändringslogg: https://github.com/vector-im/element-android/releases/tag/v1.1.14 diff --git a/fastlane/metadata/android/sv-SE/changelogs/40101150.txt b/fastlane/metadata/android/sv-SE/changelogs/40101150.txt new file mode 100644 index 0000000000..db74658651 --- /dev/null +++ b/fastlane/metadata/android/sv-SE/changelogs/40101150.txt @@ -0,0 +1,2 @@ +Huvudsakliga ändringar i den här versionen: röstmeddelandeimplementation under experimentinställningar. +Full ändringslogg: https://github.com/vector-im/element-android/releases/tag/v1.1.15 From bcd127167154889dd473bbaa2cb32f730f6899e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Sun, 8 Aug 2021 20:41:48 +0000 Subject: [PATCH 29/49] Translated using Weblate (Estonian) Currently translated at 100.0% (27 of 27 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/et/ --- fastlane/metadata/android/et/changelogs/40101150.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 fastlane/metadata/android/et/changelogs/40101150.txt diff --git a/fastlane/metadata/android/et/changelogs/40101150.txt b/fastlane/metadata/android/et/changelogs/40101150.txt new file mode 100644 index 0000000000..caab68c89f --- /dev/null +++ b/fastlane/metadata/android/et/changelogs/40101150.txt @@ -0,0 +1,2 @@ +Põhilised muutused selles versioonis: häälsõnumid katsete all. +Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases/tag/v1.1.15 From 871925e3401bf13670f96294ce5ef972500004c7 Mon Sep 17 00:00:00 2001 From: random Date: Mon, 9 Aug 2021 09:13:05 +0000 Subject: [PATCH 30/49] Translated using Weblate (Italian) Currently translated at 100.0% (27 of 27 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/it/ --- fastlane/metadata/android/it-IT/changelogs/40101150.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 fastlane/metadata/android/it-IT/changelogs/40101150.txt diff --git a/fastlane/metadata/android/it-IT/changelogs/40101150.txt b/fastlane/metadata/android/it-IT/changelogs/40101150.txt new file mode 100644 index 0000000000..7a7eef5757 --- /dev/null +++ b/fastlane/metadata/android/it-IT/changelogs/40101150.txt @@ -0,0 +1,2 @@ +Modifiche principali in questa versione: implementazione messaggi vocali nelle impostazioni Laboratori. +Cronologia completa: https://github.com/vector-im/element-android/releases/tag/v1.1.15 From c13f30a5c1cdf11672f84d3b435c325deccbaa04 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Mon, 9 Aug 2021 01:25:04 +0000 Subject: [PATCH 31/49] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (27 of 27 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/zh_Hant/ --- fastlane/metadata/android/zh-TW/changelogs/40101150.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 fastlane/metadata/android/zh-TW/changelogs/40101150.txt diff --git a/fastlane/metadata/android/zh-TW/changelogs/40101150.txt b/fastlane/metadata/android/zh-TW/changelogs/40101150.txt new file mode 100644 index 0000000000..c730151fe7 --- /dev/null +++ b/fastlane/metadata/android/zh-TW/changelogs/40101150.txt @@ -0,0 +1,2 @@ +此版本中的主要變動:實驗室設定下,語音訊息的實作。 +完整的變更紀錄:https://github.com/vector-im/element-android/releases/tag/v1.1.15 From d2fc32117ca154727cdddf34313aaace11eccf1a Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Sun, 8 Aug 2021 20:14:16 +0000 Subject: [PATCH 32/49] Translated using Weblate (Czech) Currently translated at 100.0% (27 of 27 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/cs/ --- fastlane/metadata/android/cs-CZ/changelogs/40101150.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 fastlane/metadata/android/cs-CZ/changelogs/40101150.txt diff --git a/fastlane/metadata/android/cs-CZ/changelogs/40101150.txt b/fastlane/metadata/android/cs-CZ/changelogs/40101150.txt new file mode 100644 index 0000000000..e82655d352 --- /dev/null +++ b/fastlane/metadata/android/cs-CZ/changelogs/40101150.txt @@ -0,0 +1,2 @@ +Hlavní změny v této verzi: implementace hlasových zpráv dosupných v rámci laboratoře. +Úplný seznam změn: https://github.com/vector-im/element-android/releases/tag/v1.1.15 From 9f4a45911656c0f873027fc4c83958b62057444d Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Tue, 10 Aug 2021 15:40:04 +0300 Subject: [PATCH 33/49] Fix cannot draw waveform while recording after onPause. --- .../vector/app/features/home/room/detail/RoomDetailFragment.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt index 6a8b4fa863..c37f1840ac 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt @@ -1044,6 +1044,9 @@ class RoomDetailFragment @Inject constructor( notificationDrawerManager.setCurrentRoom(roomDetailArgs.roomId) roomDetailPendingActionStore.data?.let { handlePendingAction(it) } roomDetailPendingActionStore.data = null + + // Removed listeners should be set again + setupVoiceMessageView() } private fun handlePendingAction(roomDetailPendingAction: RoomDetailPendingAction) { From 5cc9c6231b372143d326369ffc0f6bea043ebfbe Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Tue, 10 Aug 2021 15:44:09 +0300 Subject: [PATCH 34/49] Changelog added. --- changelog.d/3798.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/3798.bugfix diff --git a/changelog.d/3798.bugfix b/changelog.d/3798.bugfix new file mode 100644 index 0000000000..92374d94d6 --- /dev/null +++ b/changelog.d/3798.bugfix @@ -0,0 +1 @@ +Voice Message - UI Improvements \ No newline at end of file From 9b011f9fbdb1a4ff6a2d8c4b0827ff4920067d36 Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Tue, 10 Aug 2021 17:58:41 +0300 Subject: [PATCH 35/49] Enable voice message by default, remove from labs. --- changelog.d/3802.bugfix | 1 + changelog.d/3817.feature | 1 + .../features/home/room/detail/RoomDetailFragment.kt | 10 +++++----- .../timeline/helper/VoiceMessagePlaybackTracker.kt | 3 ++- .../vector/app/features/settings/VectorPreferences.kt | 6 ------ vector/src/main/res/xml/vector_settings_labs.xml | 5 ----- 6 files changed, 9 insertions(+), 17 deletions(-) create mode 100644 changelog.d/3802.bugfix create mode 100644 changelog.d/3817.feature diff --git a/changelog.d/3802.bugfix b/changelog.d/3802.bugfix new file mode 100644 index 0000000000..59c3f8526c --- /dev/null +++ b/changelog.d/3802.bugfix @@ -0,0 +1 @@ +Stop VMs playing in the timeline if a new VM recording is started \ No newline at end of file diff --git a/changelog.d/3817.feature b/changelog.d/3817.feature new file mode 100644 index 0000000000..f9854db647 --- /dev/null +++ b/changelog.d/3817.feature @@ -0,0 +1 @@ +Voice Message - Enable by default, remove from labs \ No newline at end of file diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt index 6a8b4fa863..c45421448b 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt @@ -971,7 +971,7 @@ class RoomDetailFragment @Inject constructor( autoCompleter.exitSpecialMode() views.composerLayout.collapse() - views.voiceMessageRecorderView.isVisible = text.isBlank() && vectorPreferences.labsUseVoiceMessage() + views.voiceMessageRecorderView.isVisible = text.isBlank() updateComposerText(text) views.composerLayout.views.sendButton.contentDescription = getString(R.string.send) @@ -1298,7 +1298,7 @@ class RoomDetailFragment @Inject constructor( } override fun onTextBlankStateChanged(isBlank: Boolean) { - if (!views.composerLayout.views.sendButton.isVisible && vectorPreferences.labsUseVoiceMessage()) { + if (!views.composerLayout.views.sendButton.isVisible) { // Animate alpha to prevent overlapping with the animation of the send button views.voiceMessageRecorderView.alpha = 0f views.voiceMessageRecorderView.isVisible = true @@ -1318,7 +1318,7 @@ class RoomDetailFragment @Inject constructor( if (text.isNotBlank()) { // We collapse ASAP, if not there will be a slight annoying delay views.composerLayout.collapse(true) - views.voiceMessageRecorderView.isVisible = vectorPreferences.labsUseVoiceMessage() + views.voiceMessageRecorderView.isVisible = true lockSendButton = true roomDetailViewModel.handle(RoomDetailAction.SendMessage(text, vectorPreferences.isMarkdownEnabled())) emojiPopup.dismiss() @@ -1372,10 +1372,10 @@ class RoomDetailFragment @Inject constructor( if (state.canSendMessage) { if (!views.voiceMessageRecorderView.isActive()) { views.composerLayout.isVisible = true - views.voiceMessageRecorderView.isVisible = vectorPreferences.labsUseVoiceMessage() && views.composerLayout.text?.isBlank().orFalse() + views.voiceMessageRecorderView.isVisible = views.composerLayout.text?.isBlank().orFalse() views.composerLayout.setRoomEncrypted(summary.isEncrypted) views.notificationAreaView.render(NotificationAreaView.State.Hidden) - views.composerLayout.alwaysShowSendButton = !vectorPreferences.labsUseVoiceMessage() + views.composerLayout.alwaysShowSendButton = false } } else { views.composerLayout.isVisible = false diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/VoiceMessagePlaybackTracker.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/VoiceMessagePlaybackTracker.kt index 1196a845e3..446d4161e3 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/VoiceMessagePlaybackTracker.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/VoiceMessagePlaybackTracker.kt @@ -68,7 +68,8 @@ class VoiceMessagePlaybackTracker @Inject constructor() { .forEach { key -> val state = states[key] if (state is Listener.State.Playing) { - setState(key, Listener.State.Paused(state.playbackTime)) + // Paused(state.playbackTime) state should also be considered later. + setState(key, Listener.State.Idle) } } } diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorPreferences.kt b/vector/src/main/java/im/vector/app/features/settings/VectorPreferences.kt index fbc9f5836e..e3949983fc 100755 --- a/vector/src/main/java/im/vector/app/features/settings/VectorPreferences.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorPreferences.kt @@ -154,8 +154,6 @@ class VectorPreferences @Inject constructor(private val context: Context) { const val SETTINGS_LABS_USE_RESTRICTED_JOIN_RULE = "SETTINGS_LABS_USE_RESTRICTED_JOIN_RULE" const val SETTINGS_LABS_SPACES_HOME_AS_ORPHAN = "SETTINGS_LABS_SPACES_HOME_AS_ORPHAN" - const val SETTINGS_LABS_VOICE_MESSAGE = "SETTINGS_LABS_VOICE_MESSAGE" - private const val SETTINGS_DEVELOPER_MODE_PREFERENCE_KEY = "SETTINGS_DEVELOPER_MODE_PREFERENCE_KEY" private const val SETTINGS_LABS_SHOW_HIDDEN_EVENTS_PREFERENCE_KEY = "SETTINGS_LABS_SHOW_HIDDEN_EVENTS_PREFERENCE_KEY" private const val SETTINGS_LABS_ENABLE_SWIPE_TO_REPLY = "SETTINGS_LABS_ENABLE_SWIPE_TO_REPLY" @@ -989,8 +987,4 @@ class VectorPreferences @Inject constructor(private val context: Context) { putInt(TAKE_PHOTO_VIDEO_MODE, mode) } } - - fun labsUseVoiceMessage(): Boolean { - return defaultPrefs.getBoolean(SETTINGS_LABS_VOICE_MESSAGE, false) - } } diff --git a/vector/src/main/res/xml/vector_settings_labs.xml b/vector/src/main/res/xml/vector_settings_labs.xml index 50227590be..1e0f736db2 100644 --- a/vector/src/main/res/xml/vector_settings_labs.xml +++ b/vector/src/main/res/xml/vector_settings_labs.xml @@ -57,9 +57,4 @@ android:key="SETTINGS_LABS_SPACES_HOME_AS_ORPHAN" android:title="@string/labs_space_show_orphan_in_home"/> - - \ No newline at end of file From 45077c69f771951fc9924b8cd8b017b847b81cd6 Mon Sep 17 00:00:00 2001 From: David Langley Date: Wed, 11 Aug 2021 09:59:23 +0100 Subject: [PATCH 36/49] remove NotificationIndex Int index --- .../settings/notifications/NotificationIndex.kt | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/NotificationIndex.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/NotificationIndex.kt index 27f9302c45..29d316bb76 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/NotificationIndex.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/NotificationIndex.kt @@ -19,14 +19,10 @@ package im.vector.app.features.settings.notifications import org.matrix.android.sdk.api.pushrules.rest.PushRule import org.matrix.android.sdk.api.pushrules.toJson -enum class NotificationIndex(val index: Int) { - OFF(0), - SILENT(1), - NOISY(2); - - companion object { - fun fromInt(index: Int) = values().first { it.index == index } - } +enum class NotificationIndex { + OFF, + SILENT, + NOISY; } /** From c2401e04b4966a76de2b058f1583431d69ee2134 Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Wed, 11 Aug 2021 14:54:29 +0300 Subject: [PATCH 37/49] Fix collapsing mic and send buttons. --- .../vector/app/features/home/room/detail/RoomDetailFragment.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt index c37f1840ac..e50d6c8df3 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt @@ -1321,7 +1321,6 @@ class RoomDetailFragment @Inject constructor( if (text.isNotBlank()) { // We collapse ASAP, if not there will be a slight annoying delay views.composerLayout.collapse(true) - views.voiceMessageRecorderView.isVisible = vectorPreferences.labsUseVoiceMessage() lockSendButton = true roomDetailViewModel.handle(RoomDetailAction.SendMessage(text, vectorPreferences.isMarkdownEnabled())) emojiPopup.dismiss() From a8f4b318c18c067e9d63edfc2d87f7bf9745c5e5 Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Wed, 11 Aug 2021 14:59:21 +0300 Subject: [PATCH 38/49] Fix tice vibration after cancelling the voice record. --- .../home/room/detail/composer/VoiceMessageRecorderView.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt index 96a066b295..47e72b46f7 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt @@ -219,6 +219,7 @@ class VoiceMessageRecorderView @JvmOverloads constructor( } RecordingState.CANCELLED -> { hideRecordingViews(isCancelled = true) + vibrate(context) } RecordingState.LOCKED -> { if (isRecordingStateChanged) { // Do not update views if it was already in locked state. @@ -428,10 +429,6 @@ class VoiceMessageRecorderView @JvmOverloads constructor( if (recordingState == RecordingState.CANCELLED || recordingState == RecordingState.NONE) { hideToast() } - - if (isCancelled.orFalse()) { - vibrate(context) - } } private fun resetMicButtonUi() { From 8216acfd5ca131525e38d791cd83fe83d88629a5 Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Wed, 11 Aug 2021 16:40:45 +0300 Subject: [PATCH 39/49] version++ --- vector/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/build.gradle b/vector/build.gradle index 5b5f65e9dd..c3be35bb81 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -13,8 +13,8 @@ kapt { // Note: 2 digits max for each value ext.versionMajor = 1 -ext.versionMinor = 1 -ext.versionPatch = 17 +ext.versionMinor = 2 +ext.versionPatch = 0 static def getGitTimestamp() { def cmd = 'git show -s --format=%ct' From bb4a45a93d0a862459b56356ce177de489e98803 Mon Sep 17 00:00:00 2001 From: Danial Behzadi Date: Tue, 10 Aug 2021 17:43:45 +0000 Subject: [PATCH 40/49] Translated using Weblate (Persian) Currently translated at 99.6% (2542 of 2552 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/fa/ --- vector/src/main/res/values-fa/strings.xml | 62 ++++++++++++++++++----- 1 file changed, 49 insertions(+), 13 deletions(-) diff --git a/vector/src/main/res/values-fa/strings.xml b/vector/src/main/res/values-fa/strings.xml index 0e3a186ff6..a085d4c08e 100644 --- a/vector/src/main/res/values-fa/strings.xml +++ b/vector/src/main/res/values-fa/strings.xml @@ -990,7 +990,7 @@ عادی محرمانگی کاهش‌یافته کاره برای اجرا در پس‌زمینه نیاز به اجازه دارد - کاره در پس‌زمینه، به وصل شدن به کارساز خانگی نیاز ندارد. این کار نصرف باتری را کاهش می‌دهد + کاره در پس‌زمینه، به وصل شدن به کارساز خانگی نیاز ندارد. این کار مصرف باتری را کاهش می‌دهد صدای آگاهی گزینش رنگ چراغ، لرزش، صدا و… پیام‌های شامل نام نمایشی @@ -1476,7 +1476,7 @@ ورود جدید. خودتان بودید؟ برای بازبینی و تأیید بزنید من نبودم - تأیید افزاره‌هایتان از تنظیمات. + تأیید لغو شد. می‌توانید تأیید را دوباره آغاز کنید. تأیید لغو شد عبارت عبور بازیابی کلید پیام @@ -1726,9 +1726,9 @@ برنامه Push دریافت کرد برنامه منتظر دریافت Push است تست ‌Push - ثبت توکن FCM در سرور موفقیت آمیز نبود: + شکست در ثبت ژتون FCM در کارساز خانگی: \n%1$s - توکن FCM با موفقیت در سرور ثبت شد. + ژتون FCM با موفقیت در کارساز خانگی ثبت شد. ثبت توکن افزودن حساب کاربری [%1$s] @@ -2100,7 +2100,7 @@ پیام پاک شد به نظر در تلاش برای وصل شدن به کارساز خانگی دیگری هستید. می‌خواهید خارج شوید؟ برای بازنشانی گذرواژه‌ی خود نیاز به پیکربندی سرور هویت‌سنجی دارید. - شما از سرور هویت‌سنجی استفاده نمی‌کنید + از هیچ کارساز هویتی استفاده نمی‌کنید خطای نامشخص عدم تطابق کاربر عدم تطابق کلید @@ -2200,7 +2200,7 @@ کلیدهای رمزگذاری شما اکنون در پس زمینه در حال پشتیبان‌گیری بر روی سرور است. تهیه نسخه‌ی پشتیبان اولیه ممکن است چند دقیقه طول بکشد. در حال تولید کلید پشتیبان با استفاده از کلید امنیتی، این ممکن است چند ثانیه زمان ببرد. به نظر می‌رسد شما در یک نشست دیگر کلید پشتیبان تهیه کرده‌اید. آیا می‌خواهید آن را با موردی که ایجاد می‌کنید جایگزین کنید؟ - یک نسخه‌ی پشتیبان از قبل در سرور وجود دارد + از پیش، پشتیبانی روی کارساز خانگیتان وجود دارد کلید بازیابی ذخیره شد. کلید بازیابی در \\\'%s\\\' ذخیره شده است. \n @@ -2443,9 +2443,9 @@ آغاز به گپ برون‌ریزی بازرسی اگر اتاق فقط برای تعامل با افراد داخل سرور خانه شما می‌باشد، این قابلیت را فعال کنید. این تنظیم را بعدا نمی‌توانید تغییر دهید. - آیا می‌خواهید جهت کشف مخاطبینی که می شناسید، داده های مخاطب خود را (شماره تلفن و ایمیل) به سرور هویت‌سنجی(%1$s) ارسال کنید؟ + با فرستادن داده‌های آشنایانتان (شماره‌های تلفن و/یا رایانامه‌ها) به کارساز هویت پیکربندی شده (%1$s) برای کشف آشنایان موجود، موافقت می‌کنید؟ \n -\nبرای حفظ حریم خصوصی بیشتر، داده‌ها قبل از ارسال هش می‌شوند. +\nبرای محرمانگی بیش‌تر، داده‌ها پیش از ارسال، درهم ریخته می‌شوند. یک کلید امنیتی ایجاد کنید تا در مکانی امن مانند سامانه مدیریت رمز عبور یا گاوصندوق آن را ذخیره کنید. در حال حاضر هیچ ارتباطی با این شناسه وجود ندارد. هویت خود را تأیید کنید تا به پیام‌های رمز شده دسترسی پیدا کنید. @@ -2650,16 +2650,16 @@ لیترال‌های آی‌پی برای تطبیق سرور هم‌اکنون ممنوع شد. لیترال‌های آی‌پی برای تطبیق سرور هم‌اکنون اجازه داده‌شد. تطبیق سرور %s از لیست موارد مجاز حذف گردید. - تطبیق سرور %s هم‌اکنون اجازه داده‌شد. + • اکنون‌کارسازهای مطابق با %s مجاز شده‌اند. تطبیق سرور %s از لیست ممنوعیت‌ها حذف شد. - تطبیق سرور %s هم‌اکنون ممنوع شد. + • اکنون کارسازهای مطابق با %s تحریم شده‌اند. شما سطح کنترل دسترسی این اتاق را تغییر دادید. لیترال‌های آی‌پی برای تطبیق سرور اجازه داده شده‌است. %s سطح کنترل دسترسی‌ها برای این اتاق را بر روی سرور تنظیم کرد. %s سطح کنترل دسترسی برای این اتاق را تغییر داد. لیترال‌های آی‌پی برای تطبیق سرور ممنوع است. - تطبیق سرور %s اجازه داده شده‌است. - تطبیق سرور %s ممنوع شده‌است. + • کارسازهای مطابق با %s مجازند. + • کارسازهای مطابق با %s تحریم شده‌اند. شما ACL های سرور را برای این اتاق تنظیم کردید. مطمئنید که می‌خواهید تمام پیام‌های فرستاده نشده در این اتاق را حذف کنید؟ حذف پیام‌های فرستاده نشده @@ -2729,7 +2729,7 @@ مطمئن شوید که افراد درست به %s دسترسی دارند. می‌توانید بعدها این را تغییر دهید. ساخت یک فضا هر کسی در فضای این اتاق، می‌تواند اتاق را یافته و به آن بپیوندد. فقط مدیران این اتاق می توانند آن را به فضایی بیفزایند. - فضا‌ها + فقط اعضای فضا فضا‌ها با چه کسانی کار می‌کنی؟ برای پیوستن به یک فضای موجود، نیاز به دعوت دارید. @@ -2840,4 +2840,40 @@ \nمی‌توانید فضاهای موجود را به فضایی بیفزایید. فضای آزمایشی - فقط نمایش یتسم‌ها در خانه مشاوره با %1$s + پیام صوتی (%1$s) + نمی‌توان هنگام فعّال بودن پیام صوتی، پاسخ داد یا ویراست + نمی‌توان پیام صوتی ضبط کرد + نمی‌توان این پیام صوتی را پخش کرد + به کار انداختن پیام صوتی + برای توقّف یا شمیدن، روی ضبطتان بزنید + %1$dث مانده + برای ضبط نگه دارید. برای فرستادن رها کنید + حذف پیام صوتی ضبط‌شده + ضبط کردن پیام صوتی + مکث پیام صوتی + پخش پیام صوتی + قفل پیام صوتی + برای لغو، بکشید + آغاز پیام صوتی + نیازمند ارتقا + صدا + دیگر فضاها یا اتاق‌هایی که ممکن است نشناسید + فضاهایی که می‌دانید شامل این اتاقند + تصمیم بگیرید چه کسانی می‌توانند این اتاق را یافته و به آن بپیوندند. + برای ویرایش فضاها، ضربه بزنید + گزینش فضاها + تصمیم بگیرید چه فضاهایی می‌توانند به این اتاق دسترسی داشته باشند.اگر فضایی گزیده سود، اعضایش قادر خواهند بود نام اتاق را یافته و به آن بپیوندند. + فضاهایی که می‌توانند دسترسی داشته باشند + اجازه به اعضای فضا برای یافتن و دسترسی. + اعضای فضای %s می‌توانند یافته، دیده و بپیوندند. + خصوصی (فقط با دعوت) + + تماس تصویری بی‌پاسخ + %d تماس تصویری بی‌پاسخ + + + تماس صوتی بی‌پاسخ + %d تماس صوتی بی‌پاسخ + + لطفاً برای فرستادن پیام صوتی، اجازهٔ میکروفون را اعطا کنید. \ No newline at end of file From 35b381e7eac525e4562bf48c4146113f02ad468e Mon Sep 17 00:00:00 2001 From: Linerly Date: Tue, 10 Aug 2021 20:44:07 +0000 Subject: [PATCH 41/49] Translated using Weblate (Indonesian) Currently translated at 46.0% (1174 of 2552 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/id/ --- vector/src/main/res/values-in/strings.xml | 352 ++++++++++++++++++++++ 1 file changed, 352 insertions(+) diff --git a/vector/src/main/res/values-in/strings.xml b/vector/src/main/res/values-in/strings.xml index 1f2b5cfe81..2805c3536b 100644 --- a/vector/src/main/res/values-in/strings.xml +++ b/vector/src/main/res/values-in/strings.xml @@ -983,4 +983,356 @@ Di masa mendatang proses verifikasi ini akan dimutakhirkan. Anda mengirim gambar. %1$s mengirim gambar. %1$s: %2$s + Dioptimalkan untuk real-time + ${app_name} akan mengsinkron di latar belakang dengan cara yang akan mempertahankan sumber daya (baterai) yang terbatas. +\nTergantung pada keadaan sumber daya perangkat Anda, sinkronisasi dapat ditangguhkan oleh operasi sistem. + Dioptimalkan untuk baterai + Mode Sinkronisasi Latar Belakang + Aplikasinya tidak perlu menghubung ke homeserver di latar belakang, itu seharusnya akan mengurangi penggunaan baterai + Pemberitahuannya telah ditekan! + Silakan tekan notifikasinya. Jika Anda tidak melihat notifikasinya, silakan periksa pengaturan sistem. + Tampilan Pemberitahuan + Anda melihat pemberitahuan ini! Tekan saya! + Aplikasi ini sedang menunggu push + Aplikasi ini menerima push + Gagal menerima push. Solusinya adalah untuk menginstal ulang aplikasi. + Percobaan Push + Pastikan Anda mengklik tautan di email yang telah kami kirimkan kepada Anda. + Hapus %s\? + Diperlukan otentikasi + Anda tidak dapat melakukan ini dari ponsel ${app_name} + Konfirmasi password Anda + Tidak ada nomor telepon yang ditambahkan ke akun Anda + Pencarian di ruangan terenkripsi belum didukung. + Meng-filter pengguna yang dicekal + Mengubah topik + Meng-upgrade ruangan ini + Mengirim event m.room.server_acl + Mengirim pesan + Mengundang pengguna + Meng-kick pengguna + Mencekal pengguna + Mengubah izin + Mengubah nama ruangan + Mengubah visibilitas sejarah + Mengaktifkan enkripsi ruangan + Mengubah alamat utama untuk ruangan ini + Mengubah avatar ruangan + Mengubah widget + Beritahu semuanya + Menghapus pesan yang dikirim dari yang lain + Mengubah pengaturan + Role bawaan + Anda tidak diizinkan untuk memperbarui peran yang diperlukan untuk mengubah berbagai bagian ruangan + Pilih role yang diperlukan untuk mengubah berbagai bagian ruangan + Izin + Lihat dan perbarui role yang diperlukan untuk mengubah berbagai bagian ruangan. + Izin ruangan + Membatalkan pencekalan pengguna akan mengizinkan mereka untuk bergabung ke ruangan. + Batalkan pencekalan pengguna + Alasan untuk mencekal + Cekal pengguna + Pengguna yang di-kick akan menghilangkannya dari ruangan ini. +\n +\nUntuk mencegah mereka bergabung lagi, Anda seharusnya mencekalnya. + Alasan untuk meng-kick + Kick user + Apakah Anda yakin ingin membatalkan undangan untuk pengguna ini\? + Batalkan undangan + Membatalkan abaian pengguna ini akan menampilkan semua pesan dari mereka. + Batal pengabaian pengguna + Mengabaikan pengguna ini akan menghilangkan pesan mereka dari ruangan yang Anda bagikan. +\n +\nAnda dapat membalikkan tindakan ini kapan saja dalam pengaturan umum. + Abaikan pengguna + Turunkan + Anda tidak akan dapat membatalkan perubahan ini karena Anda menurunkan diri sendiri, jika Anda adalah pengguna istimewa terakhir di ruangan itu akan tidak mungkin untuk mendapatkan kembali hak istimewa. + Turunkan dirimu\? + Batalkan undangan + Ruangan ini tidak umum. Anda tidak akan dapat bergabung kembali tanpa undangan. + Tambahkan server identitas dalam pengaturan Anda untuk melakukan tindakan ini. + Lanjutkan + Izinkan untuk mengakses kontak. + Untuk dapat meng-scan kode QR, Anda harus mengizinkan akses kamera. + Anda menjeda panggilan + %s menjeda panggilan + Jeda + Lanjut + Kembali ke panggilan + Panggilan Aktif (%s) + + %d panggilan video yang terjawab + + + %d panggilan audio yang terjawab + + Akan menggunakan %s sebagai bantuan ketika homeserver Anda tidak menawarkannya (alamat IP Anda akan dibagikan selama panggilan) + Izinkan menggunakan server bantuan panggilan sebagai fallback + Meminta untuk konfirmasi sebelum memulai panggilan + Cegah panggilan tidak disengaja + Tidak sah, tidak ada kredensial otentikasi yang valid + Perangkat Anda menggunakan protokol keamanan TLS yang sudah usang, yang rentan terhadap serangan, untuk keamanan Anda tidak akan dapat menghubung + Kesalahan SSL. + Kesalahan SSL: identitas peer belum diverifikasi. + Tidak dapat mencapai homeserver pada URL ini, silakan periksa + Ini bukan alamat server Matrix yang valid + URL ini tidak dapat dijangkau, silakan periksa + Nomor telepon ini sudah ditentukan. + Tetapkan surel untuk pemulihan akun. Gunakan surel atau nomor telepon nanti untuk dapat ditemukan oleh orang-orang yang mengenal Anda secara opsional. + Tetapkan surel untuk pemulihan akun. Gunakan surel atau nomor telepon nanti untuk dapat ditemukan oleh orang-orang yang mengenal Anda secara opsional. + Tetapkan nomor telepon, dan nanti dapat ditemukan oleh orang-orang yang mengenal Anda secara opsional. + Tetapkan surel untuk pemulihan akun, dan nanti dapat ditemukan oleh orang-orang yang mengenal Anda secara opsional. + Masuk dengan single sign-on + Gunakan sebagai bawaan dan jangan tanya lagi + Selalu tanya + Nyalakan HD + Matikan HD + Belakang + Depan + Ganti Kamera + Headset Wireless + Headset + Speaker + Ponsel + Pilih Perangkat Suara + Gagal membangun koneksi real-time. +\nSilakan minta administrator homeserver Anda untuk mengkonfigurasi server TURN agar panggilan untuk bekerja dengan andal. + ${app_name} Panggilan Gagal + Jangan tanya saya lagi + Coba menggunakan %s + Silakan minta administrator homeserver Anda (%1$s) untuk mengkonfigurasi server TURN agar panggilan dapat bekerja dengan andal. +\n +\nAtau, Anda dapat mencoba menggunakan server publik di %2$s, tetapi ini tidak akan dapat diandalkan, dan itu akan membagikan alamat IP Anda dengan server itu. Anda juga dapat mengelola ini dalam Pengaturan. + Panggilan gagal karena konfigurasi server yang salah + URL API homeserver + Kirim sejarah permintaan pemberian kunci + Spaces + Undangan + Tampilkan semua ruangan di direktori ruangan, termasuk ruangan dengan konten eksplisit. + Tampilkan ruangan dengan konten eksplisit + Direktori ruangan + Tidak ada server identitas yang dikonfigurasi. + Tidak ada hasil lainnya + Ruangan yang Disarankan + Notifikasi + Nilai baru + Sukses + Kembali + Tidak Dipublikasikan + Ganti + Tambah + Salin + Tandai sebagai terbaca + Tutup Telepon + Tolak + Terima + Tolak + Tinjauan + Abaikan + Gagal menghapus widget + Gagal menambahkan widget + Anda tidak dapat melakukan panggilan dengan diri sendiri, tunggu untuk peserta untuk menerima undangan + Anda tidak dapat melakukan panggilan dengan diri sendiri + Pertemuan menggunakan kebijakan keamanan dan izin Jitsi. Semua orang saat ini berada di ruangan akan melihat undangan untuk bergabung saat pertemuan Anda sedang berlangsung. + Mulai rapat video + Mulai rapat audio + Konferensi sudah berlangsung! + Anda tidak memiliki izin untuk memulai panggilan + Anda tidak memiliki izin untuk memulai panggilan di ruangan ini + Anda tidak memiliki izin untuk memulai panggilan konferensi + Anda tidak memiliki izin untuk memulai panggilan konferensi di ruangan ini + Tidak ada izin + Untuk mengirim pesan suara, silakan berikan izin Mikrofon. + Untuk melakukan tindakan ini, silakan berikan izin Kamera dari pengaturan sistem. + Beberapa izin hilang untuk melakukan tindakan ini, mohon berikan izin dari pengaturan sistem. + Mulai Mengobrol + Atur Ulang + Hilangkan + Jeda + Mainkan + Putuskan + Batalkan + Tidak Ada + Tetap + Verifikasi sesi + Inisialisasi layanan + Standar Sistem + Anda mengaktifkan enkripsi ujung-ke-ujung. (algoritma tidak dikenali %2$s). + %1$s mengaktifkan enkripsi ujung-ke-ujung. (algoritma tidak dikenali %2$s). + Anda mengaktifkan enkripsi ujung-ke-ujung. + %1$s mengaktifkan enkripsi ujung-ke-ujung. + Anda telah mencegah para tamu untuk bergabung ruangan. + %1$s telah mencegah para tamu untuk bergabung ruangan. + Anda telah mencegah para tamu untuk bergabung ruangan. + %1$s telah mencegah para tamu untuk bergabung ruangan. + %1$s telah mengizinkan para tamu untuk bergabung ruangan. + Anda telah mengizinkan para tamu untuk bergabung ruangan. + Anda telah mengizinkan para tamu untuk bergabung disini. + %1$s telah mengizinkan para tamu untuk bergabung disini. + Anda mengubah alamat untuk ruangan ini. + %1$s mengubah alamat untuk ruangan ini. + Anda mengubah alamat utama dan alamat alternatif untuk ruangan ini. + %1$s mengubah alamat utama dan alamat alternatif untuk ruangan ini. + Anda mengubah alamat alternatif untuk ruangan ini. + %1$s mengubah alamat alternatif untuk ruangan ini. + + Anda menghapus alamat alternatif %1$s untuk ruangan ini. + + + %1$s menghapus alamat alternatif %2$s untuk ruangan ini. + + + Anda menambahkan alamat alternatif %1$s untuk ruangan ini. + + + %1$s menambahkan alamat alternatif %2$s untuk ruangan ini. + + Anda menghapus alamat utama untuk ruangan ini. + %1$s menghapus alamat utama untuk ruangan ini. + Anda menetapkan alamat utama untuk ruangan ini sebagai %1$s. + %1$s menetapkan alamat utama untuk ruangan ini sebagai %2$s. + Anda menambahkan %1$s dan menghapus %2$s sebagai alamat untuk ruangan ini. + %1$s menambahkan %2$s dan menghapus %3$s sebagai alamat untuk ruangan ini. + + Anda menghapus %2$s sebagai alamat untuk ruangan ini. + + + %1$s menghapus %2$s sebagai alamat untuk ruangan ini. + + + Anda menambahkan %1$s sebagai alamat untuk ruangan ini. + + + %1$s menambahkan %2$s sebagai alamat untuk ruangan ini. + + Anda menarik undangan %1$s. Alasan: %2$s + %1$s menarik undangan %2$s. Alasan: %3$s + Anda menerima undangan untuk %1$s. Alasan: %2$s + %1$s menerima undangan untuk %2$s. Alasan: %3$s + Anda membatalkan undangan untuk %1$s untuk bergabung ruangan. Alasan: %2$s + %1$s membatalkan undangan untuk %2$s untuk bergabung ruangan. Alasan: %3$s + Anda mengirim undangan ke %1$s untuk bergabung ruangan. Alasan: %2$s + %1$s mengirim undangan ke %2$s untuk bergabung ruangan. Alasan: %3$s + Anda mencekal %1$s. Alasan: %2$s + %1$s mencekal %2$s. Alasan: %3$s + %1$s membatalkan pencekalan %2$s. Alasan: %3$s + Anda membatalkan pencekalan %1$s. Alasan: %2$s + Anda meng-kick %1$s. Alasan: %2$s + %1$s meng-kick %2$s. Alasan: %3$s + Anda menolak undangan. Alasan: %1$s + %1$s menolak undangan. Alasan: %2$s + Anda meninggalkan ruangan. Alasan: %1$s + %1$s meninggalkan ruangan. Alasan: %2$s + Anda meninggalkan ruangan. Alasan: %1$s + %1$s meninggalkan ruangan. Alasan: %2$s + Anda bergabung. Alasan %1$s + %1$s bergabung. Alasan %2$s + %1$s bergabung ruangan. Alasan: %2$s + %1$s mengundang Anda. Alasan: %2$s + Anda mengundang %1$s. Alasan: %2$s + Anda bergabung ruangan. Alasan %1$s + %1$s mengundang %2$s. Alasan: %3$s + Undangan Anda. Alasan: %1$s + Undangan %1$s. Alasan: %2$s + Bersihkan antrian kiriman + Mengirim pesan… + Pesan terkirim + Sinkronisasi Awal: +\nMengimpor Data Akun + Sinkronisasi Awal: +\nMengimpor Komunitas + Sinkronisasi Awal: +\nMengimpor Ruangan yang Ditinggalkan + Sinkronisasi Awal: +\nMengimpor Ruangan yang Diundang + Sinkronisasi Awal: +\nMengimpor Ruangan Tergabung + Sinkronisasi Awal: +\nMengimpor Ruangan + Sinkronisasi awal: +\nMengimpor crypto + %1$s mengubah tingkat daya %2$s. + Sinkronisasi Awal: +\nMengimpor akun… + Sinkronisasi Awal: +\nMengunduh data… + Sinkronisasi Awal: +\nMenunggu respons server… + Ruangan kosong (tadi adalah %s) + + %1$s, %2$s, %3$s, dan %4$d lainnya + + %1$s, %2$s, %3$s, dan %4$s + %1$s, %2$s, dan %3$s + Nomor telepon + Surel + Saat ini tidak mungkin untuk bergabung kembali ke ruangan kosong. + Kesalahan Matrix + Kesalahan jaringan + Tidak dapat mengunggah gambar + Tidak dapat dihapus + Tidak dapat mengirim pesan + Perangkat pengirim belum mengirimi kami kunci untuk pesan ini. + ** Tidak dapat mendekripsi: %s ** + %1$s dari %2$s ke %3$s + Anda mengubah tingkat daya %1$s. + Kustom + Kustom (%1$d) + Standar + Moderator + Admin + Anda mengubah konferensi video + Konferensi video diubah oleh %1$s + Anda mengakhiri konferensi video + Konferensi video diakhiri oleh %1$s + Anda memulai konferensi video + Konferensi video dimulai oleh %1$s + Anda mengubah widget %1$s + %1$s mengubah widget %2$s + Anda menghapus widget %1$s + %1$s menghapus widget %2$s + Anda menambahkan widget %1$s + %1$s menambahkan widget %2$s + Anda menerima undangan untuk %1$s + %1$s menerima undangan untuk %2$s + Anda membatalkan undangan untuk %1$s + %1$s membatalkan undangan untuk %2$s + Anda membatalkan undangan untuk %1$s untuk bergabung ruangan + %1$s membatalkan undangan untuk %2$s untuk bergabung ruangan + Anda mengundang %1$s + %1$s mengundang %2$s + Anda mengirimkan undangan ke %1$s untuk bergabung ruangan + %1$s mengirimkan undangan ke %2$s untuk bergabung ruangan + Anda memperbarui profil Anda %1$s + %1$s memperbarui profil mereka %2$s + Pesan dihapus oleh %1$s [alasan: %2$s] + Pesan dihapus [alasan: %1$s] + Pesan dihapus oleh %1$s + Pesan dihapus + Anda menghapus avatar ruangan + %1$s menghapus avatar ruangan + Anda menghapus topik ruangan + %1$s menghapus topik ruangan + Anda menghapus nama ruangan + %1$s menghapus nama ruangan + (avatar juga diubah) + VoIP conference selesai + Konferensi VoIP dimulai + Anda meminta konferensi VoIP + %1$s meminta konferensi VoIP + 🎉 Semua server dilarang untuk berpartisipasi! Ruangan ini tidak lagi bisa digunakan. + Tidak ada berubahan. + Nomor telepon + Tidak ada surel yang ditambahkan ke akun Anda + Surel + • Server yang cocok dengan literal IP sekarang dilarang. + • Server yang cocok dengan %s sekarang dilarang. + • Server yang cocok dengan literal IP dilarang. + • Server yang cocok dengan IP literal sekarang diizinkan. + • Server yang cocok dengan %s telah dihapus dari daftar izin. + • Server yang cocok dengan %s sekarang telah diizinkan. + • Server yang cocok dengan %s dihapus dari daftar larangan. + Anda mengubah ACL server untuk ruangan ini. + %s mengubah ACL server untuk ruangan ini. + • Server yang cocok dengan IP literal diizinkan. \ No newline at end of file From a8c8906934c99ef1a09363f9826b68efbe24e2d9 Mon Sep 17 00:00:00 2001 From: Danial Behzadi Date: Tue, 10 Aug 2021 17:48:24 +0000 Subject: [PATCH 42/49] Translated using Weblate (Persian) Currently translated at 48.1% (13 of 27 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/fa/ --- fastlane/metadata/android/fa/changelogs/40101150.txt | 2 ++ fastlane/metadata/android/fa/short_description.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 fastlane/metadata/android/fa/changelogs/40101150.txt diff --git a/fastlane/metadata/android/fa/changelogs/40101150.txt b/fastlane/metadata/android/fa/changelogs/40101150.txt new file mode 100644 index 0000000000..46677551ef --- /dev/null +++ b/fastlane/metadata/android/fa/changelogs/40101150.txt @@ -0,0 +1,2 @@ +تغییرات اصلی در این نگارش: پیاده‌سازی پیام صوتی در تنظیمات آزمایشگاه‌ها. +گزارش دگرگونی کامل: https://github.com/vector-im/element-android/releases/tag/v1.1.15 diff --git a/fastlane/metadata/android/fa/short_description.txt b/fastlane/metadata/android/fa/short_description.txt index aba229f959..2925db47b7 100644 --- a/fastlane/metadata/android/fa/short_description.txt +++ b/fastlane/metadata/android/fa/short_description.txt @@ -1 +1 @@ -گپ و تماس نامتمرکز امن. داده‌هایتان را از اشخاص سوم امن نگه دارید. +پیام‌رسان گروهی - پیام‌رسانی رمزنگاشته، گپ گروهی و تماس‌های ویدیویی From fdf983a2c8b3528f79f73c969441f5fb6670a703 Mon Sep 17 00:00:00 2001 From: Linerly Date: Tue, 10 Aug 2021 18:11:26 +0000 Subject: [PATCH 43/49] Translated using Weblate (Indonesian) Currently translated at 100.0% (27 of 27 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/id/ --- fastlane/metadata/android/id/changelogs/40101150.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 fastlane/metadata/android/id/changelogs/40101150.txt diff --git a/fastlane/metadata/android/id/changelogs/40101150.txt b/fastlane/metadata/android/id/changelogs/40101150.txt new file mode 100644 index 0000000000..f3aec557d0 --- /dev/null +++ b/fastlane/metadata/android/id/changelogs/40101150.txt @@ -0,0 +1,2 @@ +Perubahan utama dalam versi ini: implementasi pesan suara dalam pengaturan labs. +Changelog lanjutan: https://github.com/vector-im/element-android/releases/tag/v1.1.15 From e215d964ff36ab2a9e93cf28546f5eca06176e96 Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Wed, 11 Aug 2021 17:39:18 +0000 Subject: [PATCH 44/49] Translated using Weblate (Indonesian) Currently translated at 45.7% (1174 of 2565 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/id/ --- vector/src/main/res/values-in/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-in/strings.xml b/vector/src/main/res/values-in/strings.xml index 2805c3536b..c0d421f493 100644 --- a/vector/src/main/res/values-in/strings.xml +++ b/vector/src/main/res/values-in/strings.xml @@ -1157,7 +1157,7 @@ Di masa mendatang proses verifikasi ini akan dimutakhirkan. Verifikasi sesi Inisialisasi layanan Standar Sistem - Anda mengaktifkan enkripsi ujung-ke-ujung. (algoritma tidak dikenali %2$s). + Anda mengaktifkan enkripsi ujung-ke-ujung. (algoritma tidak dikenali %1$s). %1$s mengaktifkan enkripsi ujung-ke-ujung. (algoritma tidak dikenali %2$s). Anda mengaktifkan enkripsi ujung-ke-ujung. %1$s mengaktifkan enkripsi ujung-ke-ujung. From dfc24601892b82b44cd5605d7003b578527037de Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Thu, 12 Aug 2021 02:32:54 +0300 Subject: [PATCH 45/49] Changelog added. --- CHANGES.md | 14 ++++++++++++++ changelog.d/3646.feature | 1 - changelog.d/3798.bugfix | 1 - changelog.d/3802.bugfix | 1 - changelog.d/3817.feature | 1 - .../metadata/android/en-US/changelogs/40102000.txt | 2 ++ 6 files changed, 16 insertions(+), 4 deletions(-) delete mode 100644 changelog.d/3646.feature delete mode 100644 changelog.d/3798.bugfix delete mode 100644 changelog.d/3802.bugfix delete mode 100644 changelog.d/3817.feature create mode 100644 fastlane/metadata/android/en-US/changelogs/40102000.txt diff --git a/CHANGES.md b/CHANGES.md index ece2a87304..640d56a9fd 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,17 @@ +Changes in Element v1.2.0 (2021-08-12) +====================================== + +Features ✨ +---------- + - Reorganise Advanced Notifications in to Default Notifications, Keywords and Mentions, Other (This feature is hidden in the release ui until a future release date.) ([#3646](https://github.com/vector-im/element-android/issues/3646)) + - Voice Message - Enable by default, remove from labs ([#3817](https://github.com/vector-im/element-android/issues/3817)) + +Bugfixes 🐛 +---------- + - Voice Message - UI Improvements ([#3798](https://github.com/vector-im/element-android/issues/3798)) + - Stop VMs playing in the timeline if a new VM recording is started ([#3802](https://github.com/vector-im/element-android/issues/3802)) + + Changes in Element v1.1.16 (2021-08-09) ======================================= diff --git a/changelog.d/3646.feature b/changelog.d/3646.feature deleted file mode 100644 index c44a5fa58f..0000000000 --- a/changelog.d/3646.feature +++ /dev/null @@ -1 +0,0 @@ -Reorganise Advanced Notifications in to Default Notifications, Keywords and Mentions, Other (This feature is hidden in the release ui until a future release date.) \ No newline at end of file diff --git a/changelog.d/3798.bugfix b/changelog.d/3798.bugfix deleted file mode 100644 index 92374d94d6..0000000000 --- a/changelog.d/3798.bugfix +++ /dev/null @@ -1 +0,0 @@ -Voice Message - UI Improvements \ No newline at end of file diff --git a/changelog.d/3802.bugfix b/changelog.d/3802.bugfix deleted file mode 100644 index 59c3f8526c..0000000000 --- a/changelog.d/3802.bugfix +++ /dev/null @@ -1 +0,0 @@ -Stop VMs playing in the timeline if a new VM recording is started \ No newline at end of file diff --git a/changelog.d/3817.feature b/changelog.d/3817.feature deleted file mode 100644 index f9854db647..0000000000 --- a/changelog.d/3817.feature +++ /dev/null @@ -1 +0,0 @@ -Voice Message - Enable by default, remove from labs \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/changelogs/40102000.txt b/fastlane/metadata/android/en-US/changelogs/40102000.txt new file mode 100644 index 0000000000..46d9b07809 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/40102000.txt @@ -0,0 +1,2 @@ +Main changes in this version: Voice Message is enabled by default. +Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.1.16 \ No newline at end of file From 37e722e85d242a56dc571e6e945d2ac22d9a06dc Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Thu, 12 Aug 2021 02:36:39 +0300 Subject: [PATCH 46/49] version++ --- vector/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/build.gradle b/vector/build.gradle index c3be35bb81..85fdafc7f8 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -14,7 +14,7 @@ kapt { // Note: 2 digits max for each value ext.versionMajor = 1 ext.versionMinor = 2 -ext.versionPatch = 0 +ext.versionPatch = 1 static def getGitTimestamp() { def cmd = 'git show -s --format=%ct' From 13d75f1d34a99993f570fe617e26b9641aabab1c Mon Sep 17 00:00:00 2001 From: ganfra Date: Mon, 16 Aug 2021 15:43:35 +0200 Subject: [PATCH 47/49] Fix Authenticated Jitsi not working in release #3841 --- changelog.d/3841.bugfix | 1 + vector/proguard-rules.pro | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 changelog.d/3841.bugfix diff --git a/changelog.d/3841.bugfix b/changelog.d/3841.bugfix new file mode 100644 index 0000000000..d0e84757dc --- /dev/null +++ b/changelog.d/3841.bugfix @@ -0,0 +1 @@ +Authenticated Jitsi not working in release \ No newline at end of file diff --git a/vector/proguard-rules.pro b/vector/proguard-rules.pro index 46fae8338c..7fd72ba895 100644 --- a/vector/proguard-rules.pro +++ b/vector/proguard-rules.pro @@ -64,4 +64,15 @@ -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } -dontwarn com.facebook.react.** --keep,includedescriptorclasses class com.facebook.react.bridge.** { *; } \ No newline at end of file +-keep,includedescriptorclasses class com.facebook.react.bridge.** { *; } + +-keepattributes InnerClasses + +# JWT dependencies +-keep class io.jsonwebtoken.** { *; } +-keepnames class io.jsonwebtoken.* { *; } +-keepnames interface io.jsonwebtoken.* { *; } + +-keep class org.bouncycastle.** { *; } +-keepnames class org.bouncycastle.** { *; } +-dontwarn org.bouncycastle.** \ No newline at end of file From 29279f02623c416430afd08748d665dc60f6e61f Mon Sep 17 00:00:00 2001 From: ganfra Date: Mon, 16 Aug 2021 18:27:01 +0200 Subject: [PATCH 48/49] Fix Dial pad lost entry when config changes #3845 --- changelog.d/3845.bugfix | 1 + .../main/java/im/vector/app/features/home/HomeDetailFragment.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/3845.bugfix diff --git a/changelog.d/3845.bugfix b/changelog.d/3845.bugfix new file mode 100644 index 0000000000..ce820738fe --- /dev/null +++ b/changelog.d/3845.bugfix @@ -0,0 +1 @@ +Home: Dial pad lost entry when config changes \ No newline at end of file diff --git a/vector/src/main/java/im/vector/app/features/home/HomeDetailFragment.kt b/vector/src/main/java/im/vector/app/features/home/HomeDetailFragment.kt index 13809bcef3..683ee40508 100644 --- a/vector/src/main/java/im/vector/app/features/home/HomeDetailFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/HomeDetailFragment.kt @@ -373,7 +373,7 @@ class HomeDetailFragment @Inject constructor( add(R.id.roomListContainer, RoomListFragment::class.java, params.toMvRxBundle(), fragmentTag) } is HomeTab.DialPad -> { - add(R.id.roomListContainer, createDialPadFragment()) + add(R.id.roomListContainer, createDialPadFragment(), fragmentTag) } } } else { From d7a3e6f2ca9e2d52d02cfb415e2a1e1a02b97f08 Mon Sep 17 00:00:00 2001 From: ganfra Date: Tue, 17 Aug 2021 16:03:10 +0200 Subject: [PATCH 49/49] Also fix compilation error on strings.xml --- vector/src/main/res/values-it/strings.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vector/src/main/res/values-it/strings.xml b/vector/src/main/res/values-it/strings.xml index c4737ac5ce..00bb8d4b32 100644 --- a/vector/src/main/res/values-it/strings.xml +++ b/vector/src/main/res/values-it/strings.xml @@ -1185,8 +1185,7 @@ Apri le Impostazioni Impostazioni account. Le notifiche sono abilitate per il tuo account. - Le notifiche sono disabilitate per il tuo account. -\nControlla le impostazioni dell\'account. + Le notifiche sono disabilitate per il tuo account.\nControlla le impostazioni dell\'account. Abilita Impostazioni sessione. Le notifiche sono attive per questa sessione.