mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
fix nullability of getDarkThemeMode function
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
95453d8612
commit
ff6919124a
2 changed files with 8 additions and 2 deletions
|
@ -437,7 +437,13 @@ public final class AppPreferencesImpl implements AppPreferences {
|
|||
|
||||
@Override
|
||||
public boolean isDarkModeEnabled() {
|
||||
return getDarkThemeMode() == DarkMode.DARK;
|
||||
DarkMode darkMode = getDarkThemeMode();
|
||||
|
||||
if (darkMode != null) {
|
||||
return getDarkThemeMode() == DarkMode.DARK;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -856,7 +856,7 @@ public final class DisplayUtils {
|
|||
stopShimmer(shimmerThumbnail, thumbnailView);
|
||||
|
||||
boolean isAutoUploadFolder = SyncedFolderProvider.isAutoUploadFolder(syncedFolderProvider, file, user);
|
||||
boolean isDarkModeActive = preferences.getDarkThemeMode() == DarkMode.DARK;
|
||||
boolean isDarkModeActive = preferences.isDarkModeEnabled();
|
||||
|
||||
Integer overlayIconId = file.getFileOverlayIconId(isAutoUploadFolder);
|
||||
LayerDrawable fileIcon = MimeTypeUtil.getFileIcon(isDarkModeActive, overlayIconId, context, viewThemeUtils);
|
||||
|
|
Loading…
Reference in a new issue