Some fixes
This commit is contained in:
parent
965676484a
commit
e7f8d99621
|
@ -2,7 +2,7 @@
|
||||||
<paths>
|
<paths>
|
||||||
<external-path
|
<external-path
|
||||||
name="my_images"
|
name="my_images"
|
||||||
path="Android/data/fr.gouv.etalab.mastodon.test/files/Pictures" />
|
path="Android/data/fr.gouv.etalab.mastodon/files/Pictures" />
|
||||||
|
|
||||||
<cache-path
|
<cache-path
|
||||||
name="*"
|
name="*"
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class ContextActivity extends BaseActivity {
|
||||||
focusedStatus = null; // or other values
|
focusedStatus = null; // or other values
|
||||||
if (b != null)
|
if (b != null)
|
||||||
focusedStatus = (Status) b.getSerializable(Helper.ARG_STATUS);
|
focusedStatus = (Status) b.getSerializable(Helper.ARG_STATUS);
|
||||||
if (focusedStatus == null) {
|
if (focusedStatus == null && currentAccount == null || currentAccount.mastodon_account == null) {
|
||||||
finish();
|
finish();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -309,7 +309,7 @@ public class QuickLoad {
|
||||||
QuickLoad localQuickLoad = getSavedValue(account, Timeline.TimeLineEnum.LOCAL, null);
|
QuickLoad localQuickLoad = getSavedValue(account, Timeline.TimeLineEnum.LOCAL, null);
|
||||||
QuickLoad publicQuickLoad = getSavedValue(account, Timeline.TimeLineEnum.PUBLIC, null);
|
QuickLoad publicQuickLoad = getSavedValue(account, Timeline.TimeLineEnum.PUBLIC, null);
|
||||||
|
|
||||||
if (homeQuickLoad != null && homeQuickLoad.statuses != null) {
|
if (homeQuickLoad != null && homeQuickLoad.statuses != null && newStatus != null) {
|
||||||
for (int i = 0; i < homeQuickLoad.statuses.size(); i++) {
|
for (int i = 0; i < homeQuickLoad.statuses.size(); i++) {
|
||||||
if (homeQuickLoad.statuses.get(i).id.equals(newStatus.id)) {
|
if (homeQuickLoad.statuses.get(i).id.equals(newStatus.id)) {
|
||||||
homeQuickLoad.statuses.set(i, newStatus);
|
homeQuickLoad.statuses.set(i, newStatus);
|
||||||
|
@ -327,7 +327,7 @@ public class QuickLoad {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (localQuickLoad != null && localQuickLoad.statuses != null) {
|
if (localQuickLoad != null && localQuickLoad.statuses != null && newStatus != null) {
|
||||||
for (int i = 0; i < localQuickLoad.statuses.size(); i++) {
|
for (int i = 0; i < localQuickLoad.statuses.size(); i++) {
|
||||||
if (localQuickLoad.statuses.get(i).id.equals(newStatus.id)) {
|
if (localQuickLoad.statuses.get(i).id.equals(newStatus.id)) {
|
||||||
localQuickLoad.statuses.set(i, newStatus);
|
localQuickLoad.statuses.set(i, newStatus);
|
||||||
|
@ -345,7 +345,7 @@ public class QuickLoad {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (publicQuickLoad != null && publicQuickLoad.statuses != null) {
|
if (publicQuickLoad != null && publicQuickLoad.statuses != null && newStatus != null) {
|
||||||
for (int i = 0; i < publicQuickLoad.statuses.size(); i++) {
|
for (int i = 0; i < publicQuickLoad.statuses.size(); i++) {
|
||||||
if (publicQuickLoad.statuses.get(i).id.equals(newStatus.id)) {
|
if (publicQuickLoad.statuses.get(i).id.equals(newStatus.id)) {
|
||||||
publicQuickLoad.statuses.set(i, newStatus);
|
publicQuickLoad.statuses.set(i, newStatus);
|
||||||
|
|
|
@ -179,7 +179,13 @@ public class FragmentNotificationsSettings extends PreferenceFragmentCompat impl
|
||||||
PushHelper.startStreaming(requireActivity());
|
PushHelper.startStreaming(requireActivity());
|
||||||
}
|
}
|
||||||
if (key.compareToIgnoreCase(getString(R.string.SET_LED_COLOUR_VAL)) == 0) {
|
if (key.compareToIgnoreCase(getString(R.string.SET_LED_COLOUR_VAL)) == 0) {
|
||||||
sharedPreferences.edit().putInt(getString(R.string.SET_LED_COLOUR_VAL), Integer.parseInt(key)).apply();
|
try {
|
||||||
|
int value = Integer.parseInt(key);
|
||||||
|
sharedPreferences.edit().putInt(getString(R.string.SET_LED_COLOUR_VAL), value).apply();
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<paths>
|
<paths>
|
||||||
<external-path
|
<external-path
|
||||||
name="my_images"
|
name="my_images"
|
||||||
path="Android/data/app.fedilab.android.test/files/Pictures" />
|
path="Android/data/app.fedilab.android/files/Pictures" />
|
||||||
|
|
||||||
<cache-path
|
<cache-path
|
||||||
name="*"
|
name="*"
|
||||||
|
|
Loading…
Reference in New Issue