mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-24 03:42:15 +00:00
Add: Sources Updated & New
This commit is contained in:
parent
efeb51ced7
commit
fee60a3641
@ -39,10 +39,12 @@ abstract class MainNavFragmentX : Fragment() {
|
||||
}
|
||||
}
|
||||
|
||||
enum class Source(val titleResId: Int, val sections: Boolean, val order: Boolean) {
|
||||
AVAILABLE(R.string.available, true, true),
|
||||
INSTALLED(R.string.installed, false, true),
|
||||
UPDATES(R.string.updates, false, false)
|
||||
enum class Source(val sections: Boolean, val order: Boolean) {
|
||||
AVAILABLE( true, true),
|
||||
INSTALLED( false, true),
|
||||
UPDATES( false, false),
|
||||
UPDATED( false, true),
|
||||
NEW( false, true)
|
||||
}
|
||||
|
||||
sealed class Request {
|
||||
|
@ -69,6 +69,18 @@ class MainNavFragmentViewModelX(val db: DatabaseX, source: Source) : ViewModel()
|
||||
mSections,
|
||||
mOrder
|
||||
)
|
||||
Source.UPDATED -> Request.ProductsUpdated(
|
||||
mSearchQuery,
|
||||
mSections,
|
||||
ProductItem.Order.LAST_UPDATE,
|
||||
100 // TODO add to preferences
|
||||
)
|
||||
Source.NEW -> Request.ProductsNew(
|
||||
mSearchQuery,
|
||||
mSections,
|
||||
ProductItem.Order.LAST_UPDATE,
|
||||
20 // TODO add to preferences
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user