-
Notifications
You must be signed in to change notification settings - Fork 178
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
Feature/bma/fix fdroid notification #3035
Merged
Merged
Changes from 26 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
148177f
Fix typo in log.
bmarty 907fae1
Pusher add more log and change comment to log.
bmarty acde970
Extract function and add more logs.
bmarty 101a6e6
Ensure that the code is not run twice.
bmarty 247b60b
Add Timber tag.
bmarty 68d2a1a
More log.
bmarty 3d5951c
Add test on pusher registration
bmarty 21ce1c4
Add pusher status in the state.
bmarty 725c383
Render an error dialog in case registering a pusher fails.
bmarty 675f93a
Create component ErrorDialogWithDoNotShowAgain
bmarty 64930e4
Add ability to not show the pusher registration again.
bmarty 5fa3802
Update screenshots
abc0e7e
Move setIgnoreRegistrationError call.
bmarty 7d1e841
Rename member.
bmarty eb07ae2
Add test on `ignoreRegistrationError` and `setIgnoreRegistrationError`
bmarty e31fc17
Add Unit test on UserPushStoreDataStore
bmarty 5180ce3
Add a shortcut to navigate to the notification settings in case of er…
bmarty 1f8b525
Fix back navigation issue, when opening directly the notification tro…
bmarty f72fc36
Update PushProvider API, remove `isAvailable()`, but instead rely on …
bmarty b4b407a
Store the first provider even if no distributor is available, else er…
bmarty e12f723
Fix test compilation issue.
bmarty 0908e9b
Fix test issue.
bmarty 892a6d5
Add test about selecting the first provider with a distributor.
bmarty d97db21
Rather use NoDistributorsAvailable, it has more chance to happen IRL.
bmarty 46f71de
Update screenshots
85eae46
Cleanup
bmarty 69dbb08
Merge branch 'develop' into feature/bma/fixFdroidNotification
bmarty f09b77f
Update test after merging develop.
bmarty bc30aee
Iterate on sessionVerificationService.sessionVerifiedStatus and fix t…
bmarty d69a5ee
Also fix same issue for analytics.
bmarty File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
appnav/src/main/kotlin/io/element/android/appnav/loggedin/LoggedInEvents.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Copyright (c) 2024 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 io.element.android.appnav.loggedin | ||
|
||
sealed interface LoggedInEvents { | ||
data class CloseErrorDialog(val doNotShowAgain: Boolean) : LoggedInEvents | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
appnav/src/main/kotlin/io/element/android/appnav/loggedin/PusherRegistrationFailure.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright (c) 2024 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 io.element.android.appnav.loggedin | ||
|
||
import io.element.android.libraries.matrix.api.exception.ClientException | ||
|
||
sealed class PusherRegistrationFailure : Exception() { | ||
class AccountNotVerified : PusherRegistrationFailure() | ||
class NoProvidersAvailable : PusherRegistrationFailure() | ||
class NoDistributorsAvailable : PusherRegistrationFailure() | ||
|
||
/** | ||
* @param clientException the failure that occurred. | ||
* @param isRegisteringAgain true if the server should already have a the same pusher registered. | ||
*/ | ||
class RegistrationFailure( | ||
val clientException: ClientException, | ||
val isRegisteringAgain: Boolean, | ||
) : PusherRegistrationFailure() | ||
Check warning on line 33 in appnav/src/main/kotlin/io/element/android/appnav/loggedin/PusherRegistrationFailure.kt
|
||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Checking
isVerified
first, elseensurePusherIsRegistered()
is called twice:By checking first the value:
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.
Fixed by bc30aee