mirror of https://github.com/zlatinb/muwire
store subscriber list upon subscription
parent
14857cb5ad
commit
44c880d911
|
@ -98,7 +98,7 @@ class MuWireSettings {
|
|||
|
||||
if (!trustSubscriptions.isEmpty()) {
|
||||
String encoded = trustSubscriptions.stream().
|
||||
map(it.toBase64()).
|
||||
map({it.toBase64()}).
|
||||
collect(Collectors.joining(","))
|
||||
props.setProperty("trustSubscriptions", encoded)
|
||||
}
|
||||
|
|
|
@ -46,10 +46,8 @@ class TrustSubscriber {
|
|||
|
||||
void onTrustSubscriptionEvent(TrustSubscriptionEvent e) {
|
||||
if (!e.subscribe) {
|
||||
settings.trustSubscriptions.remove(e.persona)
|
||||
remoteTrustLists.remove(e.persona.destination)
|
||||
} else {
|
||||
settings.trustSubscriptions.add(e.persona)
|
||||
RemoteTrustList trustList = remoteTrustLists.putIfAbsent(e.persona.destination, new RemoteTrustList(e.persona))
|
||||
trustList?.timestamp = 0
|
||||
synchronized(waitLock) {
|
||||
|
|
|
@ -218,6 +218,8 @@ class MainFrameController {
|
|||
if (row < 0)
|
||||
return
|
||||
Persona p = model.trusted[row]
|
||||
core.muOptions.trustSubscriptions.add(p)
|
||||
saveMuWireSettings()
|
||||
core.eventBus.publish(new TrustSubscriptionEvent(persona : p, subscribe : true))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue