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