Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,11 @@ protected void finalize() throws Throwable {

public void saveSettings() {
SiteSettingsTable.saveSettings(mSettings);
siteSettingsPreferences(mContext).edit().putString(LANGUAGE_PREF_KEY, mSettings.language).apply();
siteSettingsPreferences(mContext).edit().putInt(DEF_CATEGORY_PREF_KEY, mSettings.defaultCategory).apply();
siteSettingsPreferences(mContext).edit().putString(DEF_FORMAT_PREF_KEY, mSettings.defaultPostFormat).apply();
siteSettingsPreferences(mContext).edit()
.putString(LANGUAGE_PREF_KEY, mSettings.language)
.putInt(DEF_CATEGORY_PREF_KEY, mSettings.defaultCategory)
.putString(DEF_FORMAT_PREF_KEY, mSettings.defaultPostFormat)
.apply();
}

public @NonNull String getTitle() {
Expand Down Expand Up @@ -940,9 +942,7 @@ public void run() {
}

protected void notifyFetchErrorOnUiThread(final Exception error) {
if (mContext == null
|| (mContext instanceof Activity && ((Activity) mContext).isFinishing())
|| mListener == null) {
if (mListener == null) {
return;
}

Expand All @@ -955,9 +955,7 @@ public void run() {
}

protected void notifySaveErrorOnUiThread(final Exception error) {
if (mContext == null
|| (mContext instanceof Activity && ((Activity) mContext).isFinishing())
|| mListener == null) {
if (mListener == null) {
return;
}

Expand All @@ -973,9 +971,7 @@ public void run() {
* Notifies listener that settings have been updated with the latest remote data.
*/
protected void notifyUpdatedOnUiThread() {
if (mContext == null
|| (mContext instanceof Activity && ((Activity) mContext).isFinishing())
|| mListener == null) {
if (mListener == null) {
return;
}

Expand All @@ -991,7 +987,9 @@ public void run() {
* Notifies listener that settings have been saved or an error occurred while saving.
*/
protected void notifySavedOnUiThread() {
if (mContext == null || mListener == null) return;
if (mListener == null) {
return;
}

new Handler().post(new Runnable() {
@Override
Expand Down