mirror of
https://github.com/Ashinch/ReadYou.git
synced 2025-02-07 23:58:56 +01:00
Fix/round bottom group (#533)
This commit is contained in:
parent
98934d1bab
commit
dfceef6c7c
@ -23,4 +23,10 @@ data class Group(
|
|||||||
*/
|
*/
|
||||||
@Ignore
|
@Ignore
|
||||||
var important: Int? = 0
|
var important: Int? = 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* number of feeds within a group
|
||||||
|
* */
|
||||||
|
@Ignore
|
||||||
|
var feeds: Int = 0
|
||||||
}
|
}
|
||||||
|
@ -228,7 +228,7 @@ fun FeedsPage(
|
|||||||
group = groupWithFeed.group,
|
group = groupWithFeed.group,
|
||||||
alpha = groupAlpha,
|
alpha = groupAlpha,
|
||||||
indicatorAlpha = groupIndicatorAlpha,
|
indicatorAlpha = groupIndicatorAlpha,
|
||||||
roundedBottomCorner = { index == groupWithFeedList.lastIndex || groupWithFeed.group.important == 0 },
|
roundedBottomCorner = { index == groupWithFeedList.lastIndex || groupWithFeed.group.feeds == 0 },
|
||||||
onExpanded = {
|
onExpanded = {
|
||||||
groupsVisible[groupWithFeed.group.id] = groupsVisible.getOrPut(
|
groupsVisible[groupWithFeed.group.id] = groupsVisible.getOrPut(
|
||||||
groupWithFeed.group.id,
|
groupWithFeed.group.id,
|
||||||
|
@ -76,6 +76,7 @@ class FeedsViewModel @Inject constructor(
|
|||||||
while (feedIterator.hasNext()) {
|
while (feedIterator.hasNext()) {
|
||||||
val feed = feedIterator.next()
|
val feed = feedIterator.next()
|
||||||
val feedImportant = importantMap[feed.id] ?: 0
|
val feedImportant = importantMap[feed.id] ?: 0
|
||||||
|
groupWithFeed.group.feeds++
|
||||||
if ((isStarred || isUnread) && feedImportant == 0) {
|
if ((isStarred || isUnread) && feedImportant == 0) {
|
||||||
feedIterator.remove()
|
feedIterator.remove()
|
||||||
continue
|
continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user