From fd538ebde169fbd40fa62d317c19fb1bfc712fe8 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 14 Mar 2025 13:57:33 -0400 Subject: [PATCH] Improves multiple error dialogs appearing when zapping from the reactions bar in the feed. --- .idea/inspectionProfiles/Project_Default.xml | 4 + .../amethyst/ui/actions/EditPostView.kt | 4 +- .../amethyst/ui/actions/NewMediaView.kt | 2 +- .../ui/actions/NewUserMetadataScreen.kt | 4 +- .../ui/actions/RelaySelectionDialog.kt | 2 +- .../relays/BasicRelaySetupInfoDialog.kt | 2 +- .../ui/actions/relays/Kind3RelayListView.kt | 2 +- .../Kind3RelaySetupInfoProposalDialog.kt | 2 +- .../ui/actions/relays/RelayStatusRow.kt | 8 +- .../amethyst/ui/components/CashuRedeem.kt | 2 +- .../amethyst/ui/components/VideoView.kt | 4 +- .../ui/components/ZoomableContentDialog.kt | 8 +- .../ui/components/ZoomableContentView.kt | 2 +- .../{ => toasts}/DisplayErrorMessages.kt | 26 ++-- .../ui/components/toasts/ResourceToastMsg.kt | 30 +++++ .../ui/components/toasts/StringToastMsg.kt | 29 +++++ .../ui/components/toasts/ThrowableToastMsg.kt | 30 +++++ .../ui/components/toasts/ToastManager.kt | 89 +++++++++++++ .../amethyst/ui/components/toasts/ToastMsg.kt | 26 ++++ .../toasts/multiline/ErrorList.kt} | 117 +++--------------- .../toasts/multiline/MultiErrorToastMsg.kt | 52 ++++++++ .../multiline/MultiUserErrorMessageDialog.kt | 107 ++++++++++++++++ .../amethyst/ui/navigation/AppNavigation.kt | 8 +- .../amethyst/ui/navigation/DrawerContent.kt | 2 +- .../amethyst/ui/note/PollNote.kt | 10 +- .../amethyst/ui/note/ReactionsRow.kt | 36 +++--- .../amethyst/ui/note/RelayListRow.kt | 2 +- .../amethyst/ui/note/UpdateZapAmountDialog.kt | 10 +- .../amethyst/ui/note/ZapCustomDialog.kt | 1 + .../amethyst/ui/note/ZapNoteCompose.kt | 4 +- .../amethyst/ui/note/elements/DisplayOts.kt | 2 +- .../ui/note/elements/ZapTheDevsCard.kt | 25 ++-- .../amethyst/ui/note/types/Torrent.kt | 2 +- .../amethyst/ui/screen/AccountScreen.kt | 6 +- .../ui/screen/loggedIn/AccountBackupDialog.kt | 6 +- .../ui/screen/loggedIn/AccountViewModel.kt | 63 +--------- .../ui/screen/loggedIn/NewPostScreen.kt | 4 +- .../send/upload/ChatFileUploadDialog.kt | 2 +- .../send/ChannelFileUploadDialog.kt | 2 +- .../dvms/DvmContentDiscoveryScreen.kt | 18 +-- .../screen/loggedIn/geohash/GeoHashScreen.kt | 4 +- .../screen/loggedIn/hashtag/HashtagScreen.kt | 4 +- .../header/DisplayFollowUnfollowButton.kt | 6 +- .../profile/header/DisplayLNAddress.kt | 2 +- .../settings/SecurityFiltersScreen.kt | 6 +- .../quartz/nip01Core/crypto/KeyPair.kt | 7 +- 46 files changed, 502 insertions(+), 282 deletions(-) rename amethyst/src/main/java/com/vitorpamplona/amethyst/ui/components/{ => toasts}/DisplayErrorMessages.kt (75%) create mode 100644 amethyst/src/main/java/com/vitorpamplona/amethyst/ui/components/toasts/ResourceToastMsg.kt create mode 100644 amethyst/src/main/java/com/vitorpamplona/amethyst/ui/components/toasts/StringToastMsg.kt create mode 100644 amethyst/src/main/java/com/vitorpamplona/amethyst/ui/components/toasts/ThrowableToastMsg.kt create mode 100644 amethyst/src/main/java/com/vitorpamplona/amethyst/ui/components/toasts/ToastManager.kt create mode 100644 amethyst/src/main/java/com/vitorpamplona/amethyst/ui/components/toasts/ToastMsg.kt rename amethyst/src/main/java/com/vitorpamplona/amethyst/ui/{note/MultiUserMessageDialog.kt => components/toasts/multiline/ErrorList.kt} (65%) create mode 100644 amethyst/src/main/java/com/vitorpamplona/amethyst/ui/components/toasts/multiline/MultiErrorToastMsg.kt create mode 100644 amethyst/src/main/java/com/vitorpamplona/amethyst/ui/components/toasts/multiline/MultiUserErrorMessageDialog.kt diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index e0da3ee56..bb270b80a 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -65,6 +65,10 @@