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) {
|
enum class Source(val sections: Boolean, val order: Boolean) {
|
||||||
AVAILABLE(R.string.available, true, true),
|
AVAILABLE( true, true),
|
||||||
INSTALLED(R.string.installed, false, true),
|
INSTALLED( false, true),
|
||||||
UPDATES(R.string.updates, false, false)
|
UPDATES( false, false),
|
||||||
|
UPDATED( false, true),
|
||||||
|
NEW( false, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
sealed class Request {
|
sealed class Request {
|
||||||
|
@ -69,6 +69,18 @@ class MainNavFragmentViewModelX(val db: DatabaseX, source: Source) : ViewModel()
|
|||||||
mSections,
|
mSections,
|
||||||
mOrder
|
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