mirror of
https://github.com/readrops/Readrops.git
synced 2025-02-09 08:28:39 +01:00
Remove filter category
* Remaining: delete database field read_it_later
This commit is contained in:
parent
c4339acf31
commit
ba149db709
@ -43,7 +43,6 @@ fun TimelineItem(
|
||||
itemWithFeed: ItemWithFeed,
|
||||
onClick: () -> Unit,
|
||||
onFavorite: () -> Unit,
|
||||
onReadLater: () -> Unit,
|
||||
onShare: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
compactLayout: Boolean = false,
|
||||
@ -188,12 +187,6 @@ fun TimelineItem(
|
||||
modifier = Modifier.clickable { onFavorite() }
|
||||
)
|
||||
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.ic_read_later),
|
||||
contentDescription = null,
|
||||
modifier = Modifier.clickable { onReadLater() }
|
||||
)
|
||||
|
||||
Icon(
|
||||
imageVector = Icons.Outlined.Share,
|
||||
contentDescription = null,
|
||||
|
@ -151,7 +151,6 @@ object TimelineTab : Tab {
|
||||
text = when (state.filters.filterType) {
|
||||
FilterType.FEED_FILTER -> state.filterFeedName
|
||||
FilterType.FOLDER_FILER -> state.filterFolderName
|
||||
FilterType.READ_IT_LATER_FILTER -> stringResource(R.string.read_later)
|
||||
FilterType.STARS_FILTER -> stringResource(R.string.favorites)
|
||||
FilterType.NO_FILTER -> stringResource(R.string.articles)
|
||||
FilterType.NEW -> stringResource(R.string.new_articles)
|
||||
@ -240,7 +239,6 @@ object TimelineTab : Tab {
|
||||
navigator.push(ItemScreen())
|
||||
},
|
||||
onFavorite = { viewModel.updateStarState(itemWithFeed.item) },
|
||||
onReadLater = {},
|
||||
onShare = {
|
||||
viewModel.shareItem(itemWithFeed.item, context)
|
||||
},
|
||||
|
@ -199,7 +199,6 @@ class TimelineViewModel(
|
||||
currentAccount!!.id
|
||||
)
|
||||
|
||||
FilterType.READ_IT_LATER_FILTER -> TODO()
|
||||
FilterType.STARS_FILTER -> repository?.setAllStarredItemsRead(currentAccount!!.id)
|
||||
FilterType.NO_FILTER -> repository?.setAllItemsRead(currentAccount!!.id)
|
||||
FilterType.NEW -> TODO()
|
||||
|
@ -157,19 +157,6 @@ fun DrawerDefaultItems(
|
||||
onClick = { onClick(FilterType.STARS_FILTER) },
|
||||
modifier = Modifier.padding(NavigationDrawerItemDefaults.ItemPadding)
|
||||
)
|
||||
|
||||
NavigationDrawerItem(
|
||||
label = { Text(text = stringResource(R.string.read_later)) },
|
||||
icon = {
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.ic_read_later),
|
||||
contentDescription = null
|
||||
)
|
||||
},
|
||||
selected = selectedItem == FilterType.READ_IT_LATER_FILTER,
|
||||
onClick = { onClick(FilterType.READ_IT_LATER_FILTER) },
|
||||
modifier = Modifier.padding(NavigationDrawerItemDefaults.ItemPadding)
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
|
@ -3,7 +3,6 @@ package com.readrops.db.filters;
|
||||
enum class FilterType {
|
||||
FEED_FILTER,
|
||||
FOLDER_FILER,
|
||||
READ_IT_LATER_FILTER,
|
||||
STARS_FILTER,
|
||||
NO_FILTER,
|
||||
NEW
|
||||
|
@ -65,7 +65,6 @@ object ItemsQueryBuilder {
|
||||
when (queryFilters.filterType) {
|
||||
FilterType.FEED_FILTER -> append("feed_id = ${queryFilters.filterFeedId} And read_it_later = 0")
|
||||
FilterType.FOLDER_FILER -> append("folder_id = ${queryFilters.filterFolderId} And read_it_later = 0")
|
||||
FilterType.READ_IT_LATER_FILTER -> append("read_it_later = 1")
|
||||
FilterType.STARS_FILTER -> {
|
||||
if (separateState) {
|
||||
append("ItemState.starred = 1 And read_it_later = 0")
|
||||
|
Loading…
x
Reference in New Issue
Block a user