mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
use DC_EVENT_TRANSPORTS_MODIFIED to sync changes from remote devices
This commit is contained in:
@@ -35,6 +35,7 @@ public class DcContext {
|
||||
public final static int DC_EVENT_INCOMING_CALL_ACCEPTED = 2560;
|
||||
public final static int DC_EVENT_OUTGOING_CALL_ACCEPTED = 2570;
|
||||
public final static int DC_EVENT_CALL_ENDED = 2580;
|
||||
public final static int DC_EVENT_TRANSPORTS_MODIFIED = 2600;
|
||||
|
||||
public final static int DC_IMEX_EXPORT_SELF_KEYS = 1;
|
||||
public final static int DC_IMEX_IMPORT_SELF_KEYS = 2;
|
||||
|
||||
@@ -97,6 +97,7 @@ public class RelayListActivity extends BaseActionBarActivity
|
||||
|
||||
DcEventCenter eventCenter = DcHelper.getEventCenter(this);
|
||||
eventCenter.addObserver(DcContext.DC_EVENT_CONFIGURE_PROGRESS, this);
|
||||
eventCenter.addObserver(DcContext.DC_EVENT_TRANSPORTS_MODIFIED, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -199,7 +200,9 @@ public class RelayListActivity extends BaseActionBarActivity
|
||||
@Override
|
||||
public void handleEvent(@NonNull DcEvent event) {
|
||||
int eventId = event.getId();
|
||||
if (eventId == DcContext.DC_EVENT_CONFIGURE_PROGRESS && event.getData1Int() == 1000) {
|
||||
if (eventId == DcContext.DC_EVENT_CONFIGURE_PROGRESS) {
|
||||
if (event.getData1Int() == 1000) loadRelays();
|
||||
} else if (eventId == DcContext.DC_EVENT_TRANSPORTS_MODIFIED) {
|
||||
loadRelays();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user