This repository was archived by the owner on Jul 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
app/src/main/java/com/zulip/android/networking Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ public class AsyncGetEvents extends Thread {
41
41
private static final String POINTER = "pointer" ;
42
42
private ZulipActivity activity ;
43
43
private ZulipApp app ;
44
+ private static int interval = 1000 ;
45
+ private boolean calledFromWidget = false ;
44
46
45
47
private boolean keepThisRunning = true ;
46
48
private HTTPRequest request ;
@@ -56,6 +58,15 @@ public AsyncGetEvents(ZulipActivity zulipActivity) {
56
58
request = new HTTPRequest (app );
57
59
}
58
60
61
+ public AsyncGetEvents (ZulipApp zulipApp , int interval ) {
62
+ super ();
63
+ app = zulipApp ;
64
+ activity = null ;
65
+ request = new HTTPRequest (app );
66
+ calledFromWidget = true ;
67
+ this .interval = interval ;
68
+ }
69
+
59
70
public void start () {
60
71
registeredOrGotEventsThisRun = false ;
61
72
super .start ();
@@ -174,7 +185,7 @@ public void run() {
174
185
} catch (JSONException e ) {
175
186
backoff (e );
176
187
}
177
- Thread .sleep (1000 );
188
+ Thread .sleep (interval );
178
189
}
179
190
} catch (Exception e ) {
180
191
ZLog .logException (e );
You can’t perform that action at this time.
0 commit comments