Fix no feed placeholder not appearing in FeedTab
This commit is contained in:
parent
5a0affdf3b
commit
40accbc8b4
appcompose/src/main/java/com/readrops/app/compose
@ -18,7 +18,13 @@ class GetFoldersWithFeeds(
|
||||
.selectFeedsWithoutFolder(accountId)
|
||||
) { folders, feedsWithoutFolder ->
|
||||
val foldersWithFeeds = folders.groupBy(
|
||||
keySelector = { Folder(id = it.folderId, name = it.folderName, accountId = it.accountId) },
|
||||
keySelector = {
|
||||
Folder(
|
||||
id = it.folderId,
|
||||
name = it.folderName,
|
||||
accountId = it.accountId
|
||||
) as Folder?
|
||||
},
|
||||
valueTransform = {
|
||||
Feed(
|
||||
id = it.feedId,
|
||||
@ -37,11 +43,15 @@ class GetFoldersWithFeeds(
|
||||
}
|
||||
}
|
||||
|
||||
foldersWithFeeds + mapOf(
|
||||
Pair(
|
||||
null,
|
||||
feedsWithoutFolder.map { it.feed.apply { unreadCount = it.unreadCount } })
|
||||
)
|
||||
if (feedsWithoutFolder.isNotEmpty()) {
|
||||
foldersWithFeeds + mapOf(
|
||||
Pair(
|
||||
null,
|
||||
feedsWithoutFolder.map { it.feed.apply { unreadCount = it.unreadCount } })
|
||||
)
|
||||
}
|
||||
|
||||
foldersWithFeeds
|
||||
}
|
||||
}
|
||||
}
|
@ -11,6 +11,7 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.painter.Painter
|
||||
import com.readrops.app.compose.util.theme.ShortSpacer
|
||||
import com.readrops.app.compose.util.toDp
|
||||
|
||||
|
||||
@ -39,9 +40,11 @@ fun Placeholder(
|
||||
modifier = Modifier.size(MaterialTheme.typography.displayMedium.toDp() * 1.5f)
|
||||
)
|
||||
|
||||
ShortSpacer()
|
||||
|
||||
Text(
|
||||
text = text,
|
||||
style = MaterialTheme.typography.displayMedium
|
||||
style = MaterialTheme.typography.displaySmall
|
||||
)
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user