mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +02:00
Fix a crash
This commit is contained in:
parent
3148d5f9b2
commit
5b805ca9a9
13 changed files with 64 additions and 17 deletions
|
@ -193,7 +193,11 @@ public abstract class PeertubeBaseMainActivity extends BaseActivity implements C
|
|||
super.onDestroy();
|
||||
ChromeCasts.unregisterListener(this);
|
||||
if (manage_chromecast != null) {
|
||||
try {
|
||||
unregisterReceiver(manage_chromecast);
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
new Thread(() -> {
|
||||
if (chromeCasts != null && chromeCasts.size() > 0) {
|
||||
for (ChromeCast cast : chromeCasts) {
|
||||
|
|
|
@ -1859,9 +1859,12 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
|
|||
@Override
|
||||
protected void onDestroy() {
|
||||
|
||||
try {
|
||||
unregisterReceiver(broadcast_data);
|
||||
unregisterReceiver(broadcast_error_message);
|
||||
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (networkStateReceiver != null) {
|
||||
try {
|
||||
unregisterReceiver(networkStateReceiver);
|
||||
|
|
|
@ -195,8 +195,11 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
|
|||
if (timer != null) {
|
||||
timer.cancel();
|
||||
}
|
||||
try {
|
||||
unregisterReceiver(imageReceiver);
|
||||
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -367,7 +367,11 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload
|
|||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
try {
|
||||
unregisterReceiver(onDownloadComplete);
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
|
|
|
@ -1260,7 +1260,11 @@ public class ProfileActivity extends BaseActivity {
|
|||
scheduledExecutorService.shutdownNow();
|
||||
scheduledExecutorService = null;
|
||||
}
|
||||
try {
|
||||
unregisterReceiver(broadcast_data);
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
|
|
|
@ -340,7 +340,11 @@ public class AdminActionActivity extends BaseBarActivity {
|
|||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
if (mReceiver != null) {
|
||||
try {
|
||||
unregisterReceiver(mReceiver);
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -295,7 +295,11 @@ public class FragmentMastodonContext extends Fragment {
|
|||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
try {
|
||||
requireActivity().unregisterReceiver(receive_action);
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
super.onDestroyView();
|
||||
}
|
||||
|
||||
|
|
|
@ -272,7 +272,11 @@ public class FragmentMastodonDirectMessage extends Fragment {
|
|||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
try {
|
||||
requireActivity().unregisterReceiver(broadcast_data);
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
super.onDestroyView();
|
||||
}
|
||||
|
||||
|
|
|
@ -675,8 +675,13 @@ public class FragmentMastodonNotification extends Fragment implements Notificati
|
|||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
|
||||
try {
|
||||
requireActivity().unregisterReceiver(receive_action);
|
||||
requireActivity().unregisterReceiver(receive_refresh);
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (isAdded()) {
|
||||
storeMarker();
|
||||
}
|
||||
|
|
|
@ -1596,7 +1596,11 @@ public class PeertubeActivity extends BasePeertubeActivity implements CommentLis
|
|||
|
||||
private void unregisterReceiver() {
|
||||
if (mPowerKeyReceiver != null) {
|
||||
try {
|
||||
unregisterReceiver(mPowerKeyReceiver);
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
mPowerKeyReceiver = null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -153,7 +153,11 @@ public class PeertubeMainActivity extends PeertubeBaseMainActivity {
|
|||
if (!keepRemote) {
|
||||
typeOfConnection = TypeOfConnection.NORMAL;
|
||||
}
|
||||
try {
|
||||
unregisterReceiver(broadcast_data);
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("ApplySharedPref")
|
||||
|
|
|
@ -125,7 +125,11 @@ public class RetrieveInfoService extends Service implements NetworkStateReceiver
|
|||
super.onDestroy();
|
||||
if (networkStateReceiver != null) {
|
||||
networkStateReceiver.removeListener(this);
|
||||
try {
|
||||
unregisterReceiver(networkStateReceiver);
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Added:
|
||||
- Android 14 support
|
||||
- Automatically split long messages in threads (default: ASK)
|
||||
- Links and media are clickable when composing
|
||||
- Links and media are clicka ble when composing
|
||||
|
||||
Fixed:
|
||||
- Avoid error 429 with NTFY
|
||||
|
|
Loading…
Reference in a new issue