mute: integrate new MutelistManager
This patch is slightly large (I think still within the guidelines tho) , but also pretty straightforward. I thought for a while about how I could split this up in a straightforward way, and I couldn’t come up with anything without breaking intermediate builds. - Deleted a lot of old/unnecessary code (ie. the Collection extension for MuteItem, since we’re now using the MutelistManager sets) - Changed damus_state.contacts to damus_state.mutelist_manager for all mute list manager work - Updated MutelistView to take advantage of new code (this is probably the largest change in this patch) Lighting-Address: fishcharlie@strike.me Signed-off-by: Charlie Fish <contact@charlie.fish> Reviewed-by: William Casarin <jb55@jb55.com> Link: 20240210163650.42884-4-contact@charlie.fish Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
William Casarin
parent
a9baef7a21
commit
1d4d2b0204
@@ -14,7 +14,7 @@ enum Route: Hashable {
|
||||
case Relay(relay: String, showActionButtons: Binding<Bool>)
|
||||
case RelayDetail(relay: String, metadata: RelayMetadata?)
|
||||
case Following(following: FollowingModel)
|
||||
case MuteList(mutelist_items: Set<MuteItem>)
|
||||
case MuteList
|
||||
case RelayConfig
|
||||
case Script(script: ScriptModel)
|
||||
case Bookmarks
|
||||
@@ -58,8 +58,8 @@ enum Route: Hashable {
|
||||
RelayDetailView(state: damusState, relay: relay, nip11: metadata)
|
||||
case .Following(let following):
|
||||
FollowingView(damus_state: damusState, following: following)
|
||||
case .MuteList(let mutelist_items):
|
||||
MutelistView(damus_state: damusState, mutelist_items: mutelist_items)
|
||||
case .MuteList:
|
||||
MutelistView(damus_state: damusState)
|
||||
case .RelayConfig:
|
||||
RelayConfigView(state: damusState)
|
||||
case .Bookmarks:
|
||||
@@ -139,9 +139,8 @@ enum Route: Hashable {
|
||||
hasher.combine(relay)
|
||||
case .Following:
|
||||
hasher.combine("following")
|
||||
case .MuteList(let users):
|
||||
case .MuteList:
|
||||
hasher.combine("muteList")
|
||||
hasher.combine(users)
|
||||
case .RelayConfig:
|
||||
hasher.combine("relayConfig")
|
||||
case .Bookmarks:
|
||||
|
||||
Reference in New Issue
Block a user