Merge branch 'event-enhance-sending-stability' into 'master'
[Event] sendAgain with return and mark all sending events as error on start See merge request famedly/famedlysdk!22
This commit is contained in:
commit
0e8bfa2889
|
@ -170,10 +170,11 @@ class Event {
|
|||
}
|
||||
|
||||
/// Try to send this event again. Only works with events of status -1.
|
||||
Future<dynamic> sendAgain({String txid}) async {
|
||||
if (status != -1) return;
|
||||
Future<String> sendAgain({String txid}) async {
|
||||
if (status != -1) return null;
|
||||
remove();
|
||||
room.sendTextEvent(text, txid: txid);
|
||||
final String eventID = await room.sendTextEvent(text, txid: txid);
|
||||
return eventID;
|
||||
}
|
||||
|
||||
@Deprecated("Use [client.store.getEventList(Room room)] instead!")
|
||||
|
|
|
@ -69,6 +69,8 @@ class Store {
|
|||
}
|
||||
});
|
||||
|
||||
await _db.rawUpdate("UPDATE Events SET status=-1 WHERE status=0");
|
||||
|
||||
List<Map> list = await _db
|
||||
.rawQuery("SELECT * FROM Clients WHERE client=?", [client.clientName]);
|
||||
if (list.length == 1) {
|
||||
|
|
Loading…
Reference in a new issue