[Event] sendAgain with return and mark all sending events as error on start
This commit is contained in:
parent
968b95e5c3
commit
b5698b175f
|
@ -170,10 +170,11 @@ class Event {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Try to send this event again. Only works with events of status -1.
|
/// Try to send this event again. Only works with events of status -1.
|
||||||
Future<dynamic> sendAgain({String txid}) async {
|
Future<String> sendAgain({String txid}) async {
|
||||||
if (status != -1) return;
|
if (status != -1) return null;
|
||||||
remove();
|
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!")
|
@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
|
List<Map> list = await _db
|
||||||
.rawQuery("SELECT * FROM Clients WHERE client=?", [client.clientName]);
|
.rawQuery("SELECT * FROM Clients WHERE client=?", [client.clientName]);
|
||||||
if (list.length == 1) {
|
if (list.length == 1) {
|
||||||
|
|
Loading…
Reference in a new issue