From c2427da60d4ebcfd00f6eea9fa8cd6355099c3f4 Mon Sep 17 00:00:00 2001 From: crschnick Date: Wed, 9 Oct 2024 10:26:27 +0000 Subject: [PATCH] Fix platform preferences exception not being caught --- app/src/main/java/io/xpipe/app/core/AppTheme.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/core/AppTheme.java b/app/src/main/java/io/xpipe/app/core/AppTheme.java index b0ac3c689..186690bbc 100644 --- a/app/src/main/java/io/xpipe/app/core/AppTheme.java +++ b/app/src/main/java/io/xpipe/app/core/AppTheme.java @@ -114,7 +114,7 @@ public class AppTheme { } }); }); - } catch (UnsupportedOperationException ex) { + } catch (IllegalStateException ex) { // The platform preferences are sometimes not initialized yet ErrorEvent.fromThrowable(ex).expected().omit().handle(); } catch (Throwable t) { @@ -140,7 +140,7 @@ public class AppTheme { } else { AppPrefs.get().theme.setValue(Theme.getDefaultLightTheme()); } - } catch (UnsupportedOperationException ex) { + } catch (IllegalStateException ex) { // The platform preferences are sometimes not initialized yet ErrorEvent.fromThrowable(ex).expected().omit().handle(); } catch (Exception ex) {