File tree 3 files changed +12
-7
lines changed
app/src/main/java/org/thoughtcrime/securesms/preferences
3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ class BackupFrequencyPickerDialogFragment(private val defaultFrequency: BackupFr
15
15
16
16
override fun onCreateDialog (savedInstance : Bundle ? ): Dialog {
17
17
val context = requireContext()
18
- val localizedFrequencyOptions = frequencyOptions.map { context.getString(it.getResourceId()) }.toTypedArray()
18
+ val localizedFrequencyOptions = frequencyOptions
19
+ .map { it.getResourceId() }
20
+ .map { context.getString(it) }
21
+ .toTypedArray()
19
22
val defaultIndex = frequencyOptions.indexOf(defaultFrequency)
20
23
21
24
return MaterialAlertDialogBuilder (context)
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ package org.thoughtcrime.securesms.preferences
8
8
import androidx.annotation.StringRes
9
9
import org.thoughtcrime.securesms.R
10
10
11
- enum class BackupFrequencyV1 (val days : Int? ) {
11
+ enum class BackupFrequencyV1 (val days : Int ) {
12
12
DAILY (1 ),
13
13
WEEKLY (7 ),
14
14
MONTHLY (30 ),
@@ -25,4 +25,4 @@ enum class BackupFrequencyV1(val days: Int?) {
25
25
NEVER -> R .string.BackupsPreferenceFragment__frequency_label_never
26
26
}
27
27
}
28
- }
28
+ }
Original file line number Diff line number Diff line change @@ -57,10 +57,10 @@ public class BackupsPreferenceFragment extends Fragment {
57
57
private View create ;
58
58
private View folder ;
59
59
private View verify ;
60
- private View timer ;
61
- private View frequencyView ;
62
- private TextView timeLabel ;
63
- private TextView frequencyLabel ;
60
+ private View timer ;
61
+ private View frequencyView ;
62
+ private TextView timeLabel ;
63
+ private TextView frequencyLabel ;
64
64
private TextView toggle ;
65
65
private TextView info ;
66
66
private TextView summary ;
@@ -344,6 +344,7 @@ private void setBackupsEnabled() {
344
344
create .setVisibility (View .VISIBLE );
345
345
verify .setVisibility (View .VISIBLE );
346
346
timer .setVisibility (View .VISIBLE );
347
+ frequencyView .setVisibility (View .VISIBLE );
347
348
updateTimeLabel ();
348
349
setBackupFolderName ();
349
350
}
@@ -354,6 +355,7 @@ private void setBackupsDisabled() {
354
355
folder .setVisibility (View .GONE );
355
356
verify .setVisibility (View .GONE );
356
357
timer .setVisibility (View .GONE );
358
+ frequencyView .setVisibility (View .GONE );
357
359
AppDependencies .getJobManager ().cancelAllInQueue (LocalBackupJob .QUEUE );
358
360
}
359
361
}
You can’t perform that action at this time.
0 commit comments