diff options
author | Alex Ning <chineseperson5@gmail.com> | 2021-12-20 10:54:29 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2021-12-20 10:54:29 +0000 |
commit | f8a5dc9d6100175dec6ea6535152a28a3b685cea (patch) | |
tree | c37ef2d7d851c9449a3d3484d354a4b4c92da2de /app | |
parent | f8694309d35d2be67dfeefb2ad3038a414b082e7 (diff) | |
download | infinity-for-reddit-f8a5dc9d6100175dec6ea6535152a28a3b685cea.tar infinity-for-reddit-f8a5dc9d6100175dec6ea6535152a28a3b685cea.tar.gz infinity-for-reddit-f8a5dc9d6100175dec6ea6535152a28a3b685cea.tar.bz2 infinity-for-reddit-f8a5dc9d6100175dec6ea6535152a28a3b685cea.tar.lz infinity-for-reddit-f8a5dc9d6100175dec6ea6535152a28a3b685cea.tar.xz infinity-for-reddit-f8a5dc9d6100175dec6ea6535152a28a3b685cea.tar.zst infinity-for-reddit-f8a5dc9d6100175dec6ea6535152a28a3b685cea.zip |
Fix app crashes when fetching gfycat videos failed for autoplay.
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/FetchGfycatOrRedgifsVideoLinks.java | 2 | ||||
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/FetchStreamableVideo.java | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchGfycatOrRedgifsVideoLinks.java b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchGfycatOrRedgifsVideoLinks.java index e97b0ff4..19e720b5 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchGfycatOrRedgifsVideoLinks.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchGfycatOrRedgifsVideoLinks.java @@ -60,7 +60,7 @@ public class FetchGfycatOrRedgifsVideoLinks { } } catch (IOException e) { e.printStackTrace(); - fetchGfycatOrRedgifsVideoLinksListener.failed(-1); + handler.post(() -> fetchGfycatOrRedgifsVideoLinksListener.failed(-1)); } }); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchStreamableVideo.java b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchStreamableVideo.java index c310539a..91fc164c 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchStreamableVideo.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchStreamableVideo.java @@ -39,6 +39,7 @@ public class FetchStreamableVideo { } } catch (IOException | JSONException e) { e.printStackTrace(); + handler.post(fetchStreamableVideoListener::failed); } }); } @@ -64,6 +65,7 @@ public class FetchStreamableVideo { } } catch (IOException | JSONException e) { e.printStackTrace(); + handler.post(fetchStreamableVideoListener::failed); } }); } |