Merge pull request #2882 from Philoul/wear/new_custom_watchface

WearPlugin Sort CWF by name in Load Custom
This commit is contained in:
Milos Kozak 2023-10-08 16:09:13 +02:00 committed by GitHub
commit 85532a0332
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 1 deletions

View file

@ -56,7 +56,7 @@ class CustomWatchfaceImportListActivity : TranslatedDaggerAppCompatActivity() {
supportActionBar?.setDisplayShowTitleEnabled(true)
binding.recyclerview.layoutManager = LinearLayoutManager(this)
binding.recyclerview.adapter = RecyclerViewAdapter(prefFileListProvider.listCustomWatchfaceFiles())
binding.recyclerview.adapter = RecyclerViewAdapter(prefFileListProvider.listCustomWatchfaceFiles().sortedBy { it.metadata[CWF_NAME] })
}
inner class RecyclerViewAdapter internal constructor(private var customWatchfaceFileList: List<CwfData>) : RecyclerView.Adapter<RecyclerViewAdapter.CwfFileViewHolder>() {