diff --git a/presentation/src/main/java/com/anytypeio/anytype/presentation/settings/SpacesStorageViewModel.kt b/presentation/src/main/java/com/anytypeio/anytype/presentation/settings/SpacesStorageViewModel.kt index 6e3a02b6b3..217b285a0e 100644 --- a/presentation/src/main/java/com/anytypeio/anytype/presentation/settings/SpacesStorageViewModel.kt +++ b/presentation/src/main/java/com/anytypeio/anytype/presentation/settings/SpacesStorageViewModel.kt @@ -290,10 +290,11 @@ class SpacesStorageViewModel( otherSpaces.forEach { spaceUsage -> otherSpacesUsages += spaceUsage.bytesUsage } + val currentBytesUsage = currentSpace?.bytesUsage ?: 0L result.add( SegmentLegendItem.Active( name = activeSpace?.name.orEmpty(), - usage = currentSpace?.bytesUsage?.readableFileSize().orEmpty(), + usage = currentBytesUsage.readableFileSize() ) ) result.add( @@ -326,7 +327,11 @@ class SpacesStorageViewModel( val items = allSpaces.map { s -> val space = nodeSpaces.firstOrNull { it.space == s.targetSpaceId } if (space == null) { - SegmentLineItem.Other(0F) + if (s.targetSpaceId == activeSpace.targetSpaceId) { + SegmentLineItem.Active(0F) + } else { + SegmentLineItem.Other(0F) + } } else { val value = space.bytesUsage.toFloat() / bytesLimit if (space.space == activeSpace.targetSpaceId) { diff --git a/ui-settings/src/main/java/com/anytypeio/anytype/ui_settings/space/SegmentLine.kt b/ui-settings/src/main/java/com/anytypeio/anytype/ui_settings/space/SegmentLine.kt index bfc504e6a1..01996eb0f1 100644 --- a/ui-settings/src/main/java/com/anytypeio/anytype/ui_settings/space/SegmentLine.kt +++ b/ui-settings/src/main/java/com/anytypeio/anytype/ui_settings/space/SegmentLine.kt @@ -52,7 +52,7 @@ fun SegmentLine(items: List) { colorResource(id = R.color.palette_system_amber_125) } is SpacesStorageViewModel.SegmentLineItem.Free -> { - colorResource(id = R.color.shape_tertiary) + colorResource(id = R.color.shape_secondary) } is SpacesStorageViewModel.SegmentLineItem.Other -> { colorResource(id = R.color.palette_system_amber_50) diff --git a/ui-settings/src/main/java/com/anytypeio/anytype/ui_settings/space/SpaceStorageScreen.kt b/ui-settings/src/main/java/com/anytypeio/anytype/ui_settings/space/SpaceStorageScreen.kt index 35011cc057..e71d2312df 100644 --- a/ui-settings/src/main/java/com/anytypeio/anytype/ui_settings/space/SpaceStorageScreen.kt +++ b/ui-settings/src/main/java/com/anytypeio/anytype/ui_settings/space/SpaceStorageScreen.kt @@ -154,7 +154,7 @@ private fun SegmentLegend( } is Free -> { - colorResource(id = R.color.shape_tertiary) to "Free | ${item.legend}" + colorResource(id = R.color.shape_secondary) to "Free | ${item.legend}" } is Other -> {