mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-12-15 05:01:45 +03:00
blink notification channels
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
fa70cffd83
commit
c559c6b0b4
3 changed files with 18 additions and 3 deletions
|
@ -110,6 +110,7 @@ import com.nextcloud.talk.utils.ClosedInterfaceImpl
|
|||
import com.nextcloud.talk.utils.ConversationUtils
|
||||
import com.nextcloud.talk.utils.FileUtils
|
||||
import com.nextcloud.talk.utils.Mimetype
|
||||
import com.nextcloud.talk.utils.NotificationUtils
|
||||
import com.nextcloud.talk.utils.ParticipantPermissions
|
||||
import com.nextcloud.talk.utils.SpreedFeatures
|
||||
import com.nextcloud.talk.utils.UserIdUtils
|
||||
|
@ -1518,7 +1519,12 @@ class ConversationsListActivity :
|
|||
!platformPermissionUtil.isPostNotificationsPermissionGranted()
|
||||
val batteryOptimizationNotIgnored = !PowerManagerUtils().isIgnoringBatteryOptimizations()
|
||||
|
||||
val settingsOfUserAreWrong = notificationPermissionNotGranted || batteryOptimizationNotIgnored
|
||||
val messagesChannelNotEnabled = !NotificationUtils.isMessagesNotificationChannelEnabled(this)
|
||||
val callsChannelNotEnabled = !NotificationUtils.isCallsNotificationChannelEnabled(this)
|
||||
|
||||
val settingsOfUserAreWrong = notificationPermissionNotGranted || batteryOptimizationNotIgnored ||
|
||||
messagesChannelNotEnabled || callsChannelNotEnabled
|
||||
|
||||
val userWantsToBeNotifiedAboutWrongSettings = appPreferences.getShowNotificationWarning()
|
||||
|
||||
return settingsOfUserAreWrong &&
|
||||
|
|
|
@ -388,6 +388,10 @@ class SettingsActivity : BaseActivity(), SetPhoneNumberDialogFragment.SetPhoneNu
|
|||
ResourcesCompat.getColor(context.resources, R.color.nc_darkRed, null)
|
||||
)
|
||||
binding.callsRingtone.text = resources!!.getString(R.string.nc_common_disabled)
|
||||
|
||||
if (openedByNotificationWarning){
|
||||
blinkRipple(binding.settingsCallSound.background)
|
||||
}
|
||||
}
|
||||
|
||||
if (NotificationUtils.isMessagesNotificationChannelEnabled(this)) {
|
||||
|
@ -399,6 +403,10 @@ class SettingsActivity : BaseActivity(), SetPhoneNumberDialogFragment.SetPhoneNu
|
|||
ResourcesCompat.getColor(context.resources, R.color.nc_darkRed, null)
|
||||
)
|
||||
binding.messagesRingtone.text = resources!!.getString(R.string.nc_common_disabled)
|
||||
|
||||
if (openedByNotificationWarning){
|
||||
blinkRipple(binding.settingsMessageSound.background)
|
||||
}
|
||||
}
|
||||
|
||||
binding.settingsCallSound.setOnClickListener {
|
||||
|
|
|
@ -310,6 +310,7 @@
|
|||
android:id="@+id/settings_call_sound"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
|
@ -333,8 +334,8 @@
|
|||
android:id="@+id/settings_message_sound"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="?android:attr/selectableItemBackground">
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
|
|
Loading…
Reference in a new issue