-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding registration applications queue. #1339
Conversation
* Starting to work on admin_view_votes, needs API added yet. * Finished up adding admin view votes. * Fix package name. * Upping lemmy-api version. * Adding a moderation subfield to post and comment action dropdowns. * Adding feature flag check. * Addressing PR comments. - Moving padding up to Box. - Using alternate feature flag method.
* SwipeToAction composable * Swipe to downvote/upvote feature implemented with preset-based customization * Fix kotlin format * fix string resource * Do not use SwipeToAction when it is disabled * Improve scrolling experience * Increase color shift animation speed * Improve ranges * new preset: only votes * fix deltas & rename resources * SwipeToAction implemented correctly, SwipeToDismiss replaced with SwipeToDismissBox, fixed swipe ranges * Kotlin format * use ordinal of enum in AppDB instead of int * Fixed behaviour when downvotes disables/when not logged in * Fix formatting * Remove default param for enableDownVotes in SwipeToAction * Fix colors for swipe actions * Fixed lambda caching in rememberSwipeActionState * Format kotlin --------- Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
app/src/main/java/com/jerboa/ui/components/registrationapplications/RegistrationApplications.kt
Show resolved
Hide resolved
app/src/main/java/com/jerboa/ui/components/registrationapplications/RegistrationApplications.kt
Show resolved
Hide resolved
- Adds a last_version_code_viewed, that gets updated in the DB, and compared against the current version to show the changelog. This means we never have to manually update that column again. - Add a generate_changelog.sh script that uses git-cliff. It copies the changelog into code assets, which can be done before the release. - Fixes #1272
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only way around that would be to persist admin and mod status in the DB, which seems a bit fragile since those can be updated non-locally.
Yes but we do that already for defaultSortType and defaultListingType. We can add admin and mod status to account too. And they are much less likely to change than those two.
@@ -180,11 +197,13 @@ fun BottomNavActivity( | |||
Scaffold( | |||
snackbarHost = { JerboaSnackbarHost(snackbarHostState) }, | |||
bottomBar = { | |||
if (appSettings.showBottomNav) { | |||
if (appSettings.showBottomNav && account.isReady()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, this means an anon
account will not show the bottom bar.
I couldn't find a way around this, because even tho I'm persisting is_admin
to the DB, I still need to wait for it to read the database, otherwise the registration button will pop up in the list.
IE, even if I do if (appSettings.showBottomNav && (account.isAnon() || account.isReady())
, it means that the bottom bar will show 5 tabs, then suddenly the 6th tab will pop up only after the DB isAdmin
status is loaded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I putting this on hold rn, until I have some time to look into this. Because this should definitely be possible in a way.
Because this has bigger consequences. It would make those navigation actions things completely inaccessible. Rn its either bottomnav or in the side panel. I'll probably have tomorrow time for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No probs. As a simple fix I could also remove that account.isReady()
check. Its mainly just a visual annoyance that these extra bottom bar icons suddenly pop up, but that could be tackled at a later time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anon accounts are never ready thus isReady check fails for them. (Made it that way because this allowed anon Accounts go to through the checks and display "Not logged in" toasts )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of the change?
Just tested, and that still hides the bottom bar for anon accounts. |
Yes you were right, I fixed that. I also found and fixed a different bug, one that has been present for a while, that invalidates the jwt when u swap to anon account. Weird that we never got a bug for this |
Thx!
I've been getting that too, but for some reason only on voyager.lemmy.ml . I tested switching back and forth from Anon to my lemmy.ml account, and it doesn't seem to be an issue... not sure what's going on with voyager.lemmy.ml |
Weird, your lemmy account jwt token should also have been invalidated. (Let me be clear this was a issue in Jerboa, that I fixed in the previous commit) |
This adds an interface to handle registration applications for admins. Most of this is copied visually from lemmy-ui, but I'm open to improvements / suggestions.
One minor quirk (that also exists for lemmy-ui), is that the button on the bottom app bar only shows up after the site is fetched.
The only way around that would be to persist admin and mod status in the DB, which seems a bit fragile since those can be updated non-locally.
Demo:
Screenrecorder-2024-02-07-11-39-06-665_0_COMPRESSED.mp4
#1182