mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-11-10 16:46:44 +01:00
resets the show full text flag after 20 views.
This commit is contained in:
@@ -67,7 +67,15 @@ fun ExpandableRichTextViewer(
|
|||||||
accountViewModel: AccountViewModel,
|
accountViewModel: AccountViewModel,
|
||||||
nav: (String) -> Unit,
|
nav: (String) -> Unit,
|
||||||
) {
|
) {
|
||||||
var showFullText by remember { mutableStateOf(ShowFullTextCache.cache[id] ?: false) }
|
var showFullText by remember {
|
||||||
|
val cached = ShowFullTextCache.cache[id]
|
||||||
|
if (cached == null) {
|
||||||
|
ShowFullTextCache.cache.put(id, false)
|
||||||
|
mutableStateOf(false)
|
||||||
|
} else {
|
||||||
|
mutableStateOf(cached)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val whereToCut = remember(content) { ExpandableTextCutOffCalculator.indexToCutOff(content) }
|
val whereToCut = remember(content) { ExpandableTextCutOffCalculator.indexToCutOff(content) }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user