@@ -69,7 +69,9 @@ public AsyncGetEvents(ZulipApp zulipApp, int interval) {
69
69
70
70
public void start () {
71
71
registeredOrGotEventsThisRun = false ;
72
- super .start ();
72
+ if (!calledFromWidget ) {
73
+ super .start ();
74
+ }
73
75
}
74
76
75
77
public void abort () {
@@ -251,15 +253,16 @@ public Void call() throws Exception {
251
253
});
252
254
watch .stop ();
253
255
Log .i ("perf" , "DB people and streams: " + watch .toString ());
254
-
255
- activity .runOnUiThread (new Runnable () {
256
- @ Override
257
- public void run () {
258
- that .activity .getPeopleAdapter ().refresh ();
259
- activity .onReadyToDisplay (true );
260
- activity .checkAndSetupStreamsDrawer ();
261
- }
262
- });
256
+ if (!calledFromWidget ) {
257
+ activity .runOnUiThread (new Runnable () {
258
+ @ Override
259
+ public void run () {
260
+ that .activity .getPeopleAdapter ().refresh ();
261
+ activity .onReadyToDisplay (true );
262
+ activity .checkAndSetupStreamsDrawer ();
263
+ }
264
+ });
265
+ }
263
266
} catch (JSONException e ) {
264
267
ZLog .logException (e );
265
268
} catch (SQLException e ) {
@@ -326,12 +329,14 @@ private void processMessages(final ArrayList<Message> messages) {
326
329
int lastMessageId = messages .get (messages .size () - 1 ).getID ();
327
330
MessageRange .updateNewMessagesRange (app , lastMessageId );
328
331
329
- activity .runOnUiThread (new Runnable () {
330
- @ Override
331
- public void run () {
332
- activity .onNewMessages (messages .toArray (new Message [messages .size ()]));
333
- }
334
- });
332
+ if (!calledFromWidget ) {
333
+ activity .runOnUiThread (new Runnable () {
334
+ @ Override
335
+ public void run () {
336
+ activity .onNewMessages (messages .toArray (new Message [messages .size ()]));
337
+ }
338
+ });
339
+ }
335
340
}
336
341
337
342
}
0 commit comments