Fix potential crashes due to cash clean
This commit is contained in:
parent
fc5b2563c4
commit
23a184e6c7
|
@ -6,8 +6,8 @@ android {
|
|||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 28
|
||||
versionCode 269
|
||||
versionName "2.0.1"
|
||||
versionCode 270
|
||||
versionName "2.0.2"
|
||||
multiDexEnabled true
|
||||
renderscriptTargetApi 28 as int
|
||||
renderscriptSupportModeEnabled true
|
||||
|
|
|
@ -990,6 +990,8 @@ public class API {
|
|||
|
||||
SQLiteDatabase db = Sqlite.getInstance(context, Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
||||
statuses = new TimelineCacheDAO(context, db).get(max_id);
|
||||
|
||||
if( statuses != null){
|
||||
Iterator<Status> i = statuses.iterator();
|
||||
List<String> ids = new ArrayList<>();
|
||||
while (i.hasNext()) {
|
||||
|
@ -1001,6 +1003,8 @@ public class API {
|
|||
ids.add(s.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( statuses == null){
|
||||
return getHomeTimeline(max_id);
|
||||
}else{
|
||||
|
|
Loading…
Reference in New Issue