Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
circles-android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Circles
circles-android
Commits
caf0e39b
Commit
caf0e39b
authored
1 year ago
by
Taras
Browse files
Options
Downloads
Patches
Plain Diff
Add no info available for media progress
parent
14b64281
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/src/main/java/org/futo/circles/feature/settings/SettingsFragment.kt
+12
-10
12 additions, 10 deletions
...ava/org/futo/circles/feature/settings/SettingsFragment.kt
app/src/main/res/values/strings.xml
+1
-0
1 addition, 0 deletions
app/src/main/res/values/strings.xml
with
13 additions
and
10 deletions
app/src/main/java/org/futo/circles/feature/settings/SettingsFragment.kt
+
12
−
10
View file @
caf0e39b
...
...
@@ -115,17 +115,19 @@ class SettingsFragment : Fragment(R.layout.fragment_settings) {
}
private
fun
bindMediaUsageProgress
(
mediaUsage
:
MediaUsageInfo
?)
{
binding
.
lMediaStorage
.
setIsVisible
(
mediaUsage
!=
null
)
mediaUsage
?:
return
binding
.
mediaStorageProgress
.
apply
{
max
=
mediaUsage
.
storageSize
.
toInt
()
progress
=
mediaUsage
.
usedSize
.
toInt
()
mediaUsage
?.
let
{
binding
.
mediaStorageProgress
.
apply
{
max
=
mediaUsage
.
storageSize
.
toInt
()
progress
=
mediaUsage
.
usedSize
.
toInt
()
}
binding
.
tvMediaStorageInfo
.
text
=
getString
(
R
.
string
.
media_usage_format
,
Formatter
.
formatFileSize
(
requireContext
(),
mediaUsage
.
usedSize
),
Formatter
.
formatFileSize
(
requireContext
(),
mediaUsage
.
storageSize
),
)
}
?:
run
{
binding
.
tvMediaStorageInfo
.
text
=
getString
(
R
.
string
.
no_info_available
)
}
binding
.
tvMediaStorageInfo
.
text
=
getString
(
R
.
string
.
media_usage_format
,
Formatter
.
formatFileSize
(
requireContext
(),
mediaUsage
.
usedSize
),
Formatter
.
formatFileSize
(
requireContext
(),
mediaUsage
.
storageSize
),
)
}
private
fun
bindProfile
(
user
:
User
)
{
...
...
This diff is collapsed.
Click to expand it.
app/src/main/res/values/strings.xml
+
1
−
0
View file @
caf0e39b
...
...
@@ -194,6 +194,7 @@
<string
name=
"optional_request_message"
>
Optional: Request message
</string>
<string
name=
"media_storage"
>
Media storage
</string>
<string
name=
"media_usage_format"
>
%1$s of %2$s used
</string>
<string
name=
"no_info_available"
>
No info available
</string>
<string
name=
"group_invites_notification_format"
>
Show %d Group invitations
</string>
<string
name=
"circle_invites_notification_format"
>
Show %d Circle invitations
</string>
<string
name=
"show_connection_invites_format"
>
Show %d connection invites
</string>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment