feat: Add refresh indicator on Recovery Key page to support drag gestures #148

Merged
inex merged 1 commits from recovery-keys into master 2022-11-22 14:07:24 +02:00
Collaborator

It was impossible to forcefully request updates on recovery key status (issue 147). Now it is wrapped with drag gesture handler to force information fetching from server.

It was impossible to forcefully request updates on recovery key status (issue [147](https://git.selfprivacy.org/kherel/selfprivacy.org.app/issues/147)). Now it is wrapped with drag gesture handler to force information fetching from server.
NaiJi added the
Bug
label 2022-11-21 11:14:48 +02:00
NaiJi self-assigned this 2022-11-21 11:14:48 +02:00
NaiJi requested review from inex 2022-11-21 11:14:54 +02:00
inex requested changes 2022-11-21 14:41:22 +02:00
@ -24,2 +25,4 @@
@override
Widget build(final BuildContext context) {
if (!loadedOnOpening) {

Something feels wrong with this approach.

If you want to do something on the first draw, you use initState. Example here. Documentation.

I don't see why we need this loadedOnOpening bool variable. If you just need to ping cubit on the page entry, use initState.

Something feels wrong with this approach. If you want to do something on the first draw, you use initState. [Example here](https://git.selfprivacy.org/kherel/selfprivacy.org.app/src/branch/master/lib/ui/components/brand_tab_bar/brand_tab_bar.dart#L15). [Documentation](https://api.flutter.dev/flutter/widgets/State/initState.html). I don't see why we need this `loadedOnOpening` bool variable. If you just need to ping cubit on the page entry, use initState.
Poster
Collaborator

But initState doesn't have context. This is essentially the same thing as this check.

But initState doesn't have context. This is essentially the same thing as [this check](https://git.selfprivacy.org/kherel/selfprivacy.org.app/src/commit/0639ee4d57317b5c9d045287b297c5e8b43f6445/lib/ui/pages/server_storage/binds_migration/migration_process_page.dart#L32).
Poster
Collaborator

Oops, no, wrong link, but you get what I wanted to say.

Oops, no, wrong link, but you get what I wanted to say.
NaiJi requested review from inex 2022-11-21 15:05:04 +02:00
NaiJi changed title from feat: Add refresh indicator on Recovery Key page to support drag gestures to WIP: feat: Add refresh indicator on Recovery Key page to support drag gestures 2022-11-21 15:18:09 +02:00
NaiJi force-pushed recovery-keys from 79f69cb1cd to 3ba2c6f731 2022-11-21 15:19:21 +02:00 Compare
NaiJi changed title from WIP: feat: Add refresh indicator on Recovery Key page to support drag gestures to feat: Add refresh indicator on Recovery Key page to support drag gestures 2022-11-21 15:43:41 +02:00
inex approved these changes 2022-11-22 14:07:14 +02:00
inex merged commit 32ca58537e into master 2022-11-22 14:07:24 +02:00
inex deleted branch recovery-keys 2022-11-22 14:07:24 +02:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: SelfPrivacy/selfprivacy.org.app#148
There is no content yet.