Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nathan OBrian
Nebulo
Commits
d0ae63ea
Commit
d0ae63ea
authored
Aug 08, 2019
by
Daniel Wolf
Browse files
Use 1 as unit if none (or invalid) is given
parent
d58a1e6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/com/frostnerd/smokescreen/dialog/HostSourceRefreshDialog.kt
View file @
d0ae63ea
...
...
@@ -67,7 +67,7 @@ class HostSourceRefreshDialog(context:Context,
dialog
.
dismiss
()
context
.
getPreferences
().
automaticHostRefresh
=
view
.
automaticRefresh
.
isChecked
context
.
getPreferences
().
automaticHostRefreshWifiOnly
=
view
.
refreshWifiOnly
.
isChecked
context
.
getPreferences
().
automaticHostRefreshTimeAmount
=
view
.
timeAmount
.
text
.
toString
().
toInt
()
context
.
getPreferences
().
automaticHostRefreshTimeAmount
=
view
.
timeAmount
.
text
.
toString
().
toInt
OrNull
()
?:
1
context
.
getPreferences
().
automaticHostRefreshTimeUnit
=
TimeUnit
.
values
().
find
{
it
.
ordinal
==
view
.
timeUnit
.
selectedItemPosition
}
!!
refreshConfigChanged
()
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment