mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-27 23:09:35 +01:00
chore: Pause on display receipts
This commit is contained in:
parent
ee06ead651
commit
eba4418c8d
@ -44,11 +44,11 @@ class StoryPageController extends State<StoryPage> {
|
||||
Event? get currentEvent => index < events.length ? events[index] : null;
|
||||
|
||||
bool replyLoading = false;
|
||||
bool _emojiSelector = false;
|
||||
bool _modalOpened = false;
|
||||
|
||||
void replyEmojiAction() async {
|
||||
if (replyLoading) return;
|
||||
_emojiSelector = true;
|
||||
_modalOpened = true;
|
||||
await showModalBottomSheet(
|
||||
context: context,
|
||||
builder: (context) => EmojiPicker(
|
||||
@ -58,7 +58,7 @@ class StoryPageController extends State<StoryPage> {
|
||||
},
|
||||
),
|
||||
);
|
||||
_emojiSelector = false;
|
||||
_modalOpened = false;
|
||||
}
|
||||
|
||||
void replyAction([String? message]) async {
|
||||
@ -103,7 +103,9 @@ class StoryPageController extends State<StoryPage> {
|
||||
[];
|
||||
}
|
||||
|
||||
void displaySeenByUsers() => showModalBottomSheet(
|
||||
void displaySeenByUsers() async {
|
||||
_modalOpened = true;
|
||||
await showModalBottomSheet(
|
||||
context: context,
|
||||
builder: (context) => Scaffold(
|
||||
appBar: AppBar(
|
||||
@ -121,6 +123,8 @@ class StoryPageController extends State<StoryPage> {
|
||||
),
|
||||
),
|
||||
);
|
||||
_modalOpened = false;
|
||||
}
|
||||
|
||||
String get seenByUsersTitle {
|
||||
final seenByUsers = currentSeenByUsers;
|
||||
@ -147,7 +151,7 @@ class StoryPageController extends State<StoryPage> {
|
||||
_progressTimer?.cancel();
|
||||
if (reset) progress = Duration.zero;
|
||||
_progressTimer = Timer.periodic(_step, (_) {
|
||||
if (replyFocus.hasFocus || _emojiSelector) return;
|
||||
if (replyFocus.hasFocus || _modalOpened) return;
|
||||
if (!mounted) {
|
||||
_progressTimer?.cancel();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user