[Event] sendAgain with return and mark all sending events as error on start
This commit is contained in:
parent
968b95e5c3
commit
9e096f31f8
|
@ -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