From 7737523e276e29f23cd769ff078d77c3e1d6ab76 Mon Sep 17 00:00:00 2001 From: mmueller <15197703+mmuellr@users.noreply.github.com> Date: Sun, 11 Feb 2024 22:35:54 +0100 Subject: [PATCH] fix filesize integer overflow --- app/src/main/java/com/pr0gramm/app/ui/SettingsFragment.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/pr0gramm/app/ui/SettingsFragment.kt b/app/src/main/java/com/pr0gramm/app/ui/SettingsFragment.kt index 0afbed0b6..94b4c298d 100644 --- a/app/src/main/java/com/pr0gramm/app/ui/SettingsFragment.kt +++ b/app/src/main/java/com/pr0gramm/app/ui/SettingsFragment.kt @@ -98,9 +98,9 @@ class SettingsFragment : BasePreferenceFragment("SettingsFragment"), val totalSize = runInterruptible(Dispatchers.IO) { items.values().sumOf { item -> - item.media.length().toInt() + - item.thumbnail.length().toInt() + - (item.thumbnailFull?.length()?.toInt() ?: 0) + item.media.length() + + item.thumbnail.length() + + (item.thumbnailFull?.length() ?: 0) } }