mirror of
https://github.com/SimpleMobileTools/Simple-Voice-Recorder.git
synced 2025-02-24 23:47:48 +01:00
cleanup PlayerFragment
This commit is contained in:
parent
1134819b25
commit
ccc82c8605
@ -167,20 +167,24 @@ class PlayerFragment(context: Context, attributeSet: AttributeSet) : MyViewPager
|
||||
}
|
||||
|
||||
private fun getRecordings(): ArrayList<Recording> {
|
||||
val recordings = ArrayList<Recording>()
|
||||
return when {
|
||||
isRPlus() -> {
|
||||
ArrayList(getMediaStoreRecordings() + getSAFRecordings()).apply {
|
||||
sortByDescending { it.timestamp }
|
||||
}
|
||||
recordings.addAll(getMediaStoreRecordings())
|
||||
recordings.addAll(getSAFRecordings())
|
||||
recordings
|
||||
}
|
||||
isQPlus() -> {
|
||||
ArrayList(getMediaStoreRecordings() + getLegacyRecordings()).apply {
|
||||
sortByDescending { it.timestamp }
|
||||
}
|
||||
recordings.addAll(getMediaStoreRecordings())
|
||||
recordings.addAll(getLegacyRecordings())
|
||||
recordings
|
||||
}
|
||||
else -> {
|
||||
getLegacyRecordings()
|
||||
recordings.addAll(getLegacyRecordings())
|
||||
recordings
|
||||
}
|
||||
}.apply {
|
||||
sortByDescending { it.timestamp }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user