kopia lustrzana https://github.com/ryukoposting/Signal-Android
Prevent displaying my stories page when none are present in viewer.
rodzic
aae683af41
commit
bdf7e5d367
|
@ -19,7 +19,22 @@ class StoryViewerRepository {
|
||||||
|
|
||||||
val myStory: RecipientId = SignalDatabase.recipients.getOrInsertFromDistributionListId(DistributionListId.MY_STORY)
|
val myStory: RecipientId = SignalDatabase.recipients.getOrInsertFromDistributionListId(DistributionListId.MY_STORY)
|
||||||
|
|
||||||
listOf(myStory) + doNotCollapse
|
val myStoriesCount = SignalDatabase.mms.allOutgoingStories.use {
|
||||||
|
var count = 0
|
||||||
|
while (it.next != null) {
|
||||||
|
if (!it.current.recipient.isGroup) {
|
||||||
|
count++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
count
|
||||||
|
}
|
||||||
|
|
||||||
|
if (myStoriesCount > 0) {
|
||||||
|
listOf(myStory) + doNotCollapse
|
||||||
|
} else {
|
||||||
|
doNotCollapse
|
||||||
|
}
|
||||||
}.subscribeOn(Schedulers.io())
|
}.subscribeOn(Schedulers.io())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue