Skip to content

Commit 8e08ad2

Browse files
committed
Fix occasional setSpan crash when viewing comments with emote flairs
1 parent ac08f90 commit 8e08ad2

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

src/main/assets/changelog-alpha.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/Alpha 366 (2026-06-28)
2+
Fix occasional setSpan crash when viewing comments with emote flairs
3+
14
/Alpha 365 (2026-04-02)
25
Workaround for text field issue on Reddit's login page (caused by their cookie banner)
36

src/main/assets/changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
118/1.26
2+
Fix occasional setSpan crash when viewing comments with emote flairs
3+
14
117/1.25.2
25
Workaround for text field issue on Reddit's login page (caused by their cookie banner)
36

src/main/java/org/quantumbadger/redreader/reddit/prepared/RedditParsedComment.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import org.quantumbadger.redreader.cache.CacheRequest;
3434
import org.quantumbadger.redreader.cache.CacheRequestCallbacks;
3535
import org.quantumbadger.redreader.cache.downloadstrategy.DownloadStrategyIfNotCached;
36+
import org.quantumbadger.redreader.common.AndroidCommon;
3637
import org.quantumbadger.redreader.common.BetterSSB;
3738
import org.quantumbadger.redreader.common.Constants;
3839
import org.quantumbadger.redreader.common.General;
@@ -200,9 +201,11 @@ public void onDataStreamComplete(
200201
image,
201202
alignment);
202203

203-
if (mFlair != null) {
204-
mFlair.replace(placeholder, span);
205-
}
204+
AndroidCommon.runOnUiThread(() -> {
205+
if (mFlair != null) {
206+
mFlair.replace(placeholder, span);
207+
}
208+
});
206209
} catch (final Throwable t) {
207210
onFailure(new RRError(
208211
"Exception while downloading emote",

0 commit comments

Comments
 (0)