Enable offline posting

You can now post, like, repost, reply offline

Changelog-Added: Enable offline posting
This commit is contained in:
William Casarin
2023-03-31 15:14:55 -07:00
parent 915f3901a7
commit 2596542cb6
25 changed files with 196 additions and 31 deletions

View File

@@ -111,7 +111,7 @@ struct RecommendedRelayView: View {
return
}
process_contact_event(state: damus, ev: ev_after_add)
damus.pool.send(.event(ev_after_add))
damus.postbox.send(ev_after_add)
}
}

View File

@@ -46,7 +46,7 @@ struct RelayDetailView: View {
}
process_contact_event(state: state, ev: new_ev)
state.pool.send(.event(new_ev))
state.postbox.send(new_ev)
dismiss()
}) {
Text("Disconnect From Relay", comment: "Button to disconnect from the relay.")
@@ -60,7 +60,7 @@ struct RelayDetailView: View {
return
}
process_contact_event(state: state, ev: ev_after_add)
state.pool.send(.event(ev_after_add))
state.postbox.send(ev_after_add)
dismiss()
}) {
Text("Connect To Relay", comment: "Button to connect to the relay.")

View File

@@ -82,7 +82,7 @@ struct RelayView: View {
}
process_contact_event(state: state, ev: new_ev)
state.pool.send(.event(new_ev))
state.postbox.send(new_ev)
}) {
if showText {
Text(NSLocalizedString("Disconnect", comment: "Button to disconnect from a relay server."))