[ios] refactor Toast class and improve toast message style

1. update style: bigger fonts and insets
2. update background blur
3. get rid of MWM prefix
4. replace the timer with the simplier dispatch async after. In this case there is no needed to create a timer for each toasts message just to add a timeout
5. reorder Toast class methods
6. replace the instance `show` method with a `static show`. Because there non needed to call show every time. We do not have stored toast that will be showed in different places thane created.
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>

Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
Kiryl Kaveryn
2023-12-23 18:29:05 +04:00
committed by Konstantin Pastbin
parent 72cc4bbd50
commit 103d660603
10 changed files with 99 additions and 80 deletions

View File

@@ -346,7 +346,7 @@ private extension AboutController {
UIPasteboard.general.string = content
let message = String(format: L("copied_to_clipboard"), content)
UIImpactFeedbackGenerator(style: .medium).impactOccurred()
Toast.toast(withText: message).show(withAlignment: .bottom, pinToSafeArea: false)
Toast.show(withText: message, alignment: .bottom, pinToSafeArea: false)
}
}