|
@ -64,7 +64,7 @@ public class DownloadsActivity extends BaseActivity implements DownloadsAdapter. |
|
|
if (downloadsUrl != null && !Objects.equals(downloadsUrl, "")) { |
|
|
if (downloadsUrl != null && !Objects.equals(downloadsUrl, "")) { |
|
|
ThmmyPage.PageCategory target = ThmmyPage.resolvePageCategory(Uri.parse(downloadsUrl)); |
|
|
ThmmyPage.PageCategory target = ThmmyPage.resolvePageCategory(Uri.parse(downloadsUrl)); |
|
|
if (!target.is(ThmmyPage.PageCategory.DOWNLOADS)) { |
|
|
if (!target.is(ThmmyPage.PageCategory.DOWNLOADS)) { |
|
|
Timber.e("Bundle came with a non board url!\nUrl:\n%s" , downloadsUrl); |
|
|
Timber.e("Bundle came with a non downloads url!\nUrl:\n%s" , downloadsUrl); |
|
|
Toast.makeText(this, "An error has occurred\nAborting.", Toast.LENGTH_SHORT).show(); |
|
|
Toast.makeText(this, "An error has occurred\nAborting.", Toast.LENGTH_SHORT).show(); |
|
|
finish(); |
|
|
finish(); |
|
|
} |
|
|
} |
|
@ -72,8 +72,9 @@ public class DownloadsActivity extends BaseActivity implements DownloadsAdapter. |
|
|
|
|
|
|
|
|
//Initialize toolbar
|
|
|
//Initialize toolbar
|
|
|
toolbar = findViewById(R.id.toolbar); |
|
|
toolbar = findViewById(R.id.toolbar); |
|
|
if (downloadsTitle == null || Objects.equals(downloadsTitle, "")) |
|
|
if (downloadsTitle == null || downloadsTitle.equals("")) |
|
|
toolbar.setTitle("Downloads"); |
|
|
toolbar.setTitle("Downloads"); |
|
|
|
|
|
else |
|
|
toolbar.setTitle(downloadsTitle); |
|
|
toolbar.setTitle(downloadsTitle); |
|
|
setSupportActionBar(toolbar); |
|
|
setSupportActionBar(toolbar); |
|
|
if (getSupportActionBar() != null) { |
|
|
if (getSupportActionBar() != null) { |
|
@ -235,8 +236,9 @@ public class DownloadsActivity extends BaseActivity implements DownloadsAdapter. |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
protected void postParsing(ResultCode result) { |
|
|
protected void postParsing(ResultCode result) { |
|
|
if (downloadsTitle != null && !Objects.equals(downloadsTitle, "") && |
|
|
if (downloadsTitle != null && !downloadsTitle.equals("") |
|
|
toolbar.getTitle() != downloadsTitle) |
|
|
&& !downloadsTitle.equals("Αρχεία για λήψη") |
|
|
|
|
|
&& toolbar.getTitle() != downloadsTitle) |
|
|
toolbar.setTitle(downloadsTitle); |
|
|
toolbar.setTitle(downloadsTitle); |
|
|
|
|
|
|
|
|
++pagesLoaded; |
|
|
++pagesLoaded; |
|
|