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
@@ -72,7 +72,7 @@ struct AddMuteItemView: View {
|
||||
|
||||
// Actually update & relay the new mute list
|
||||
if let mute_item {
|
||||
let existing_mutelist = state.contacts.mutelist
|
||||
let existing_mutelist = state.mutelist_manager.event
|
||||
|
||||
guard
|
||||
let full_keypair = state.keypair.to_full(),
|
||||
@@ -81,7 +81,7 @@ struct AddMuteItemView: View {
|
||||
return
|
||||
}
|
||||
|
||||
state.contacts.set_mutelist(mutelist)
|
||||
state.mutelist_manager.set_mutelist(mutelist)
|
||||
state.postbox.send(mutelist)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user