Merge remote-tracking branch 'origin/main' into claude/fix-marmot-polling-R83Bs
This commit is contained in:
@@ -914,6 +914,20 @@ object LocalCache : ILocalCache, ICacheProvider {
|
||||
event.tagsWithoutCitations().mapNotNull { checkGetOrCreateNote(it) }
|
||||
}
|
||||
|
||||
is ChatEvent -> {
|
||||
// Amethyst's own kind:9 replies carry the parent as a NIP-18
|
||||
// `q` tag (see ChatEvent.replyingTo), but the broader Marmot
|
||||
// ecosystem — WhiteNoise in particular — threads kind:9 chats
|
||||
// with a plain NIP-10 `e` tag. Accept both so inbound replies
|
||||
// from either client show their quote bubble in the feed.
|
||||
val eTagTargets =
|
||||
event.tags
|
||||
.filter { it.size > 1 && it[0] == "e" }
|
||||
.map { it[1] }
|
||||
val qTagTargets = event.quotedEvents().map { it.eventId }
|
||||
(eTagTargets + qTagTargets).mapNotNull { checkGetOrCreateNote(it) }
|
||||
}
|
||||
|
||||
else -> {
|
||||
emptyList()
|
||||
}
|
||||
|
||||
+1
@@ -124,6 +124,7 @@ class AccountFeedContentStates(
|
||||
scope.launch(Dispatchers.IO) {
|
||||
account.marmotGroupList.groupListChanges.collect {
|
||||
dmKnown.invalidateData()
|
||||
dmNew.invalidateData()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
-2
@@ -93,8 +93,12 @@ fun MarmotGroupListScreen(
|
||||
// (Account.ensureMarmotKeyPackagePublished), so this screen no longer
|
||||
// needs to do anything to make sure invitees can find a KeyPackage.
|
||||
|
||||
val knownGroups = remember(groupList) { groupList.filter { it.second.ownerSentMessage } }
|
||||
val newRequestGroups = remember(groupList) { groupList.filter { !it.second.ownerSentMessage } }
|
||||
val followState by accountViewModel.account.kind3FollowList.flow
|
||||
.collectAsStateWithLifecycle()
|
||||
val followingKeySet = followState.authors
|
||||
|
||||
val knownGroups = remember(groupList, followingKeySet) { groupList.filter { it.second.isKnown(followingKeySet) } }
|
||||
val newRequestGroups = remember(groupList, followingKeySet) { groupList.filter { !it.second.isKnown(followingKeySet) } }
|
||||
val visibleGroups = if (selectedTab == 0) knownGroups else newRequestGroups
|
||||
|
||||
Scaffold(
|
||||
|
||||
+5
-1
@@ -79,7 +79,11 @@ class ChatroomListKnownFeedFilter(
|
||||
|
||||
val marmotGroups =
|
||||
account.marmotGroupList.rooms.mapNotNull { _, chatroom ->
|
||||
chatroom.newestMessage ?: chatroom.placeholderNote()
|
||||
if (chatroom.isKnown(followingKeySet)) {
|
||||
chatroom.newestMessage ?: chatroom.placeholderNote()
|
||||
} else {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
return (privateMessages + publicChannels + ephemeralChats + marmotGroups).sortedWith(DefaultFeedOrder)
|
||||
|
||||
+10
-1
@@ -47,7 +47,16 @@ class ChatroomListNewFeedFilter(
|
||||
}
|
||||
}
|
||||
|
||||
return privateMessages.sortedWith(DefaultFeedOrder)
|
||||
val marmotGroups =
|
||||
account.marmotGroupList.rooms.mapNotNull { _, chatroom ->
|
||||
if (!chatroom.isKnown(followingKeySet)) {
|
||||
chatroom.newestMessage ?: chatroom.placeholderNote()
|
||||
} else {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
return (privateMessages + marmotGroups).sortedWith(DefaultFeedOrder)
|
||||
}
|
||||
|
||||
override fun updateListWith(
|
||||
|
||||
Reference in New Issue
Block a user