Skip to content

Commit

Permalink
Workaround for #677
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamantcheese committed Feb 22, 2020
1 parent 4fc8887 commit 0c8c22c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1068,16 +1068,22 @@ public void onPostLinkableClicked(Post post, PostLinkable linkable) {
} else if (linkable.type == PostLinkable.Type.BOARD) {
Board board = databaseManager.runTask(databaseManager.getDatabaseBoardManager()
.getBoard(loadable.site, (String) linkable.value));
Loadable catalog = databaseManager.getDatabaseLoadableManager().get(Loadable.forCatalog(board));

threadPresenterCallback.showBoard(catalog);
if (board == null) {
showToast(context, R.string.site_uses_dynamic_boards);
} else {
Loadable catalog = databaseManager.getDatabaseLoadableManager().get(Loadable.forCatalog(board));
threadPresenterCallback.showBoard(catalog);
}
} else if (linkable.type == PostLinkable.Type.SEARCH) {
CommentParser.SearchLink search = (CommentParser.SearchLink) linkable.value;
Board board = databaseManager.runTask(databaseManager.getDatabaseBoardManager()
.getBoard(loadable.site, search.board));
Loadable catalog = databaseManager.getDatabaseLoadableManager().get(Loadable.forCatalog(board));

threadPresenterCallback.showBoardAndSearch(catalog, search.search);
if (board == null) {
showToast(context, R.string.site_uses_dynamic_boards);
} else {
Loadable catalog = databaseManager.getDatabaseLoadableManager().get(Loadable.forCatalog(board));
threadPresenterCallback.showBoardAndSearch(catalog, search.search);
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions Kuroba/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -794,4 +794,6 @@ Don't have a 4chan Pass?<br>
<string name="settings_auto_crash_report_description">By enabling this setting, all collected crash logs will be uploaded automatically on every app restart. Crash reports only collect the crash log itself, app version and basic OS information.</string>
<string name="media_settings_base_dir_reset_message">Base directory reset to default</string>
<string name="media_settings_could_not_create_default_baseDir">Could not create default base dir: %1$s</string>

<string name="site_uses_dynamic_boards">"Unable to go to board (site likely has dynamic boards). Add the board using the boards menu first."</string>
</resources>

0 comments on commit 0c8c22c

Please sign in to comment.