Telegram for Android freezes for more than 5 seconds when scrolling through unread posts in a channel. Android subsequently displays the Telegram isn't responding warning.
The issue occurs in large news channels, such as BBC Russian, and appears to depend on the app's cache or storage size. It does not manifest on a fresh installation.
ANR traces indicate that the UI thread is waiting on the database inside markDialogAsRead → MessagesStorage.isMonoForum.
Open a large Telegram channel containing unread messages, preferably one with large posts, such as a news channel. Ensure the app's cache or storage is sufficiently large, as the issue does not manifest on a fresh installation.
Scroll down toward the next unread post.
Observe the app when the unread message counter is about to decrease by one.
Wait for the app to freeze and for Android to display the Telegram isn't responding warning.
Select Wait and observe that the same warning appears again several seconds later.
Current result
The app momentarily freezes when the unread message counter is about to decrease. After several seconds, Android displays the Telegram isn't responding warning. Selecting Wait does not resolve the issue, and the warning reappears after several seconds.
ANR traces show the UI thread waiting on the database inside markDialogAsRead → MessagesStorage.isMonoForum.
Expected result
The app should remain responsive when scrolling through unread posts in large channels, without prolonged UI freezes or ANR warnings.
Device info
Telegram Android 13.1.1 (72371), Google Pixel 8, 17 (37)