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