Got stuck in "no such table"
This commit is contained in:
@@ -157,7 +157,7 @@ public class CacheController{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}catch(IOException x){
|
}catch(IOException x){
|
||||||
Log.w(TAG, "getHomeTimeline: corrupted status object in database", x);
|
Log.w(TAG, "getConversationsTimeline: corrupted status object in database", x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
new GetConversationsTimeline(maxID, null, count, null)
|
new GetConversationsTimeline(maxID, null, count, null)
|
||||||
@@ -393,15 +393,18 @@ public class CacheController{
|
|||||||
)""");
|
)""");
|
||||||
createRecentSearchesTable(db);
|
createRecentSearchesTable(db);
|
||||||
createPostsNotificationsTable(db);
|
createPostsNotificationsTable(db);
|
||||||
|
createConversationsTimelineTable(db);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion){
|
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion){
|
||||||
if(oldVersion==1){
|
if(oldVersion==1){
|
||||||
createRecentSearchesTable(db);
|
createRecentSearchesTable(db);
|
||||||
|
createConversationsTimelineTable(db);
|
||||||
}
|
}
|
||||||
if(oldVersion==2){
|
if(oldVersion==2){
|
||||||
createPostsNotificationsTable(db);
|
createPostsNotificationsTable(db);
|
||||||
|
createConversationsTimelineTable(db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -423,6 +426,15 @@ public class CacheController{
|
|||||||
`type` INTEGER NOT NULL
|
`type` INTEGER NOT NULL
|
||||||
)""");
|
)""");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void createConversationsTimelineTable(SQLiteDatabase db){
|
||||||
|
db.execSQL("""
|
||||||
|
CREATE TABLE `conversations_timeline` (
|
||||||
|
`id` VARCHAR(25) NOT NULL PRIMARY KEY,
|
||||||
|
`json` TEXT NOT NULL,
|
||||||
|
`flags` INTEGER NOT NULL DEFAULT 0
|
||||||
|
)""");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public class NotificationsFragment extends MastodonToolbarFragment implements Sc
|
|||||||
} else if (item.getItemId() == R.id.clear_notifications) {
|
} else if (item.getItemId() == R.id.clear_notifications) {
|
||||||
UiUtils.confirmDeleteNotification(getActivity(), accountID, null, ()->{
|
UiUtils.confirmDeleteNotification(getActivity(), accountID, null, ()->{
|
||||||
for (int i = 0; i < tabViews.length; i++) {
|
for (int i = 0; i < tabViews.length; i++) {
|
||||||
getFragmentForPage(i).reload();
|
// getFragmentForPage(i).reload();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
@@ -202,7 +202,7 @@ public class NotificationsFragment extends MastodonToolbarFragment implements Sc
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void scrollToTop(){
|
public void scrollToTop(){
|
||||||
getFragmentForPage(pager.getCurrentItem()).scrollToTop();
|
// getFragmentForPage(pager.getCurrentItem()).scrollToTop();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadData(){
|
public void loadData(){
|
||||||
|
|||||||
Reference in New Issue
Block a user