Repository navigation
Conversation
b6802f5 to
036014d
Compare
Signed-off-by: Jorge Aguado Recio <jaguado@izertis.com>
8d4f8ac to
7676799
Compare
…issions Signed-off-by: Jorge Aguado Recio <jaguado@izertis.com>
Signed-off-by: Jorge Aguado Recio <jaguado@izertis.com>
Signed-off-by: Jorge Aguado Recio <jaguado@izertis.com>
Signed-off-by: Jorge Aguado Recio <jaguado@izertis.com>
…success Signed-off-by: Jorge Aguado Recio <jaguado@izertis.com>
…ace paths Signed-off-by: Jorge Aguado Recio <jaguado@izertis.com>
Signed-off-by: Jorge Aguado Recio <jaguado@izertis.com>
| private fun observeEditLinkResult() { | ||
| collectLatestLifecycleFlow(publicLinksViewModel.editLinkResultFlow) { event -> | ||
| event?.peekContent()?.let { uiResult -> | ||
| when (uiResult) { | ||
| is UIResult.Loading -> { } | ||
| is UIResult.Success -> { | ||
| if (publicLinksViewModel.addPublicLinkUIState.value?.wasPasswordChanged != true) { | ||
| graphShareViewModel.getGraphShares() | ||
| showMessageInSnackbar(getString(R.string.public_link_edit_correctly)) | ||
| } | ||
| publicLinksViewModel.resetViewModel() | ||
| } | ||
| is UIResult.Error -> { } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| private fun observeEditPasswordLinkResult() { | ||
| collectLatestLifecycleFlow(publicLinksViewModel.editPasswordLinkResultFlow) { event -> | ||
| event?.peekContent()?.let { uiResult -> | ||
| when (uiResult) { | ||
| is UIResult.Loading -> { } | ||
| is UIResult.Success -> { | ||
| graphShareViewModel.getGraphShares() | ||
| showMessageInSnackbar(getString(R.string.public_link_edit_correctly)) | ||
| } | ||
| is UIResult.Error -> { } |
There was a problem hiding this comment.
If both password and other field change, observers handle information separately, so, we'll see two snackbars, one for the password, another for the other fields. Same for the getGraphShares call. Is that correct or am i missing something?
OTOH, if password request fails, will the editLink request be launched?
There was a problem hiding this comment.
Only one snackbar will appear in the screen. The PATCH is not triggered unless the POST (password operation) success. If the password request fails, the editLink will not be launched
a5cec2a to
d9cf8b8
Compare
|
Regarding a914f8b Consolidate edit link result handling into a single observer. Previously, success and error were split across |
d9cf8b8 to
1bda377
Compare
…ink failure Signed-off-by: Jorge Aguado Recio <jaguado@izertis.com>
1bda377 to
a914f8b
Compare
(1)In a server with no mandatory password, or server with mandatory password for writeable links (using can edit)
Current: Password switch enabled Expected: Password switch disabled Xiaomi redmi 13, Android 15 |
Related Issues
App: #4970
ReleaseNotesViewModel.ktcreating a newReleaseNote()with String resources (if required)QA