Skip to content

Commit

Permalink
Show post side toolbar items in the correct order
Browse files Browse the repository at this point in the history
  • Loading branch information
QuantumBadger committed Feb 12, 2023
1 parent 5159c7a commit 43011ba
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/main/assets/changelog-alpha.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/Alpha 327 (2023-02-11)
/Alpha 327 (2023-02-12)
Rewrote JSON parsing code for posts and comments to use kotlinx serialization
Show post side toolbar items in the correct order

/Alpha 326 (2023-02-05)
Subreddit emotes now supported in comments (thanks to bharatkvn)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -931,8 +931,25 @@ object RedditPostActions {
else -> throw RuntimeException("Unknown drawable for $action")
}

// TODO these are in the wrong order now
PrefsUtility.pref_menus_post_toolbar_items()
val itemsToShow = PrefsUtility.pref_menus_post_toolbar_items();

listOf(
Action.ACTION_MENU,
Action.COMMENTS_SWITCH,
Action.LINK_SWITCH,
Action.UPVOTE,
Action.DOWNVOTE,
Action.SAVE,
Action.HIDE,
Action.REPLY,
Action.EXTERNAL,
Action.SAVE_IMAGE,
Action.SHARE,
Action.COPY,
Action.USER_PROFILE,
Action.PROPERTIES
)
.filter { itemsToShow.contains(it) }
.filterNot {
isComments && it == Action.COMMENTS_SWITCH
|| !isComments && it == Action.LINK_SWITCH
Expand Down

0 comments on commit 43011ba

Please sign in to comment.