X Tutup
Skip to content

feat: Add latest button to sort apps by recently installed date#1809

Open
hunterwilhelm wants to merge 1 commit intoMM2-0:mainfrom
hunterwilhelm:feature/sort-apps-by-recent
Open

feat: Add latest button to sort apps by recently installed date#1809
hunterwilhelm wants to merge 1 commit intoMM2-0:mainfrom
hunterwilhelm:feature/sort-apps-by-recent

Conversation

@hunterwilhelm
Copy link

Hello, this PR introduces the feature requested in Latest/Recently Installed Apps (favourite like optional tab) #775.

As this is my first time contributing to the project, I hope I have gone in the right direction. So let me know what recommendations you have or any further direction I should take on this.

Visible Changes

  • See your most recently installed apps on the home screen
    • Enable it by going to Settings > Search > Favorites > "Latest button" (below "Edit button")
    • Choose the number of rows 1-10 (defaults to 2 once enabled)
    • It's not enabled by default
  • Choose to have the latest button in the "Apps" widget (enable it in the widget settings)
    • It's not enabled by default

Notable Code Change Explanations

  • SelectorTarget
    • Because I was adding Latest alongside Favorites, I needed to pass more than null through onSelectTag: (String?) to communicate Favorite/Latest. So I added onSelectTarget: (SelectorTarget) and used a sealed interface for (Favorite, Latest, and CustomTag) selector targets (see SelectorTarget.kt)
  • Automatic Latest -> Favorites state update
    • When the user disables the Latest button and has selected Latest on their homescreen, it updates the value to Favorites so they don't end up still seeing the Latest apps when the button is no longer available. (see FavoritesVM.kt)
  • Install Time Source
    • I got the firstInstallTime from context.packageManager.getPackageInfo(packageName, 0).firstInstallTime
      • Tested with ~200 apps, and the performance remains smooth.

Video Demo

Screen_recording_20260211_182121.mp4

This is the best launcher I have used so far, and I am so grateful that you made it. I am excited to have the chance to contribute back to this project!

@hunterwilhelm
Copy link
Author

Once confirmed, I'll also add docs to the user guide for this feature if that's okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

X Tutup