-
Notifications
You must be signed in to change notification settings - Fork 731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds Push Notification toggle to Device Manager #7261
Adds Push Notification toggle to Device Manager #7261
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice implementation! I have minor remarks. Please check the copyrights of all classes.
@@ -0,0 +1,66 @@ | |||
/* | |||
* Copyright (c) 2022 New Vector Ltd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This need to be Matrix.org
.
@@ -0,0 +1,64 @@ | |||
/* | |||
* Copyright (c) 2022 New Vector Ltd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remark.
@@ -0,0 +1,22 @@ | |||
/* | |||
* Copyright (c) 2022 New Vector Ltd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remark.
@@ -0,0 +1,22 @@ | |||
/* | |||
* Copyright (c) 2022 New Vector Ltd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remark.
} | ||
|
||
fun setOnCheckedChangeListener(listener: CompoundButton.OnCheckedChangeListener) { | ||
binding.sessionsOverviewEntrySwitch.setOnCheckedChangeListener(listener) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should clear the listener onDetachedFromWindow()
by setting as null
.
isVisible = false | ||
} else { | ||
val allPushersAreEnabled = pushers.all { it.enabled } | ||
setOnCheckedChangeListener { _, _ -> } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand why this is needed. I think setting listener as null would seem cleaner setOnCheckedChangeListener(null)
.
…ifications # Conflicts: # vector/src/main/java/im/vector/app/features/settings/devices/v2/overview/SessionOverviewAction.kt # vector/src/main/java/im/vector/app/features/settings/devices/v2/overview/SessionOverviewFragment.kt # vector/src/main/java/im/vector/app/features/settings/devices/v2/overview/SessionOverviewViewModel.kt # vector/src/main/java/im/vector/app/features/settings/devices/v2/overview/SessionOverviewViewState.kt # vector/src/main/res/layout/fragment_session_overview.xml # vector/src/test/java/im/vector/app/features/settings/devices/v2/overview/SessionOverviewViewModelTest.kt
@@ -0,0 +1,50 @@ | |||
/* | |||
* Copyright (c) 2022 New Vector Ltd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be Matrix.org
.
@@ -0,0 +1,22 @@ | |||
/* | |||
* Copyright (c) 2022 New Vector Ltd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be Matrix.org
.
@@ -0,0 +1,35 @@ | |||
/* | |||
* Copyright (c) 2022 New Vector Ltd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be Matrix.org
.
@@ -0,0 +1,25 @@ | |||
/* | |||
* Copyright (c) 2022 New Vector Ltd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be Matrix.org
.
@@ -0,0 +1,22 @@ | |||
/* | |||
* Copyright (c) 2022 New Vector Ltd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be Matrix.org
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the remaining copyrights, otherwise LGTM!
SonarCloud Quality Gate failed. |
Type of change
Content
Adds push notification toggle to device manager
Motivation and context
Epic: https://element-io.atlassian.net/browse/PSG-595
Closes: https://element-io.atlassian.net/browse/PSG-779
Screenshots / GIFs
Tests
Tested devices
Checklist