Skip to content

Commit

Permalink
update to stories module
Browse files Browse the repository at this point in the history
  • Loading branch information
arman-riseuplabs committed Jul 10, 2020
1 parent 6a1969d commit cc345c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 1 addition & 6 deletions app/src/main/java/io/rapidpro/surveyor/SplashActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -986,13 +986,8 @@ okhttp3.Call getURL(String url, okhttp3.Callback callback) {
}

int nextTick = 0;

Handler checkerHandler = new Handler();
Runnable checkerRunnable = new Runnable() {
public void run() {
checkerLoop();
}
};
Runnable checkerRunnable = () -> checkerLoop();

void checkerLoop() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;

import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
Expand Down Expand Up @@ -282,6 +283,7 @@ public void onResponse(Call<story_delete_api> call, Response<story_delete_api> r
try {
okResponse = okHttpClient2.newCall(okRequest).execute();
InputStream inputStream = okResponse.body().byteStream();
OutputStream out = new FileOutputStream(new File(file_path));
try (OutputStream output = context.openFileOutput(file_path, context.MODE_PRIVATE)) {
loadCount--;
byte[] buffer = new byte[4 * 1024]; // or other buffer size
Expand Down

0 comments on commit cc345c0

Please sign in to comment.