File tree Expand file tree Collapse file tree 4 files changed +21
-5
lines changed
Expand file tree Collapse file tree 4 files changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -59,5 +59,7 @@ public class Config
5959 public static readonly int VoIP_sampleRate = 16000 ;
6060 public static readonly int VoIP_bitRate = 16 ;
6161 public static readonly int VoIP_channels = 1 ;
62+
63+ public static readonly long backupReminder = 86400 * 30 ; // 1 month
6264 }
6365}
Original file line number Diff line number Diff line change @@ -1038,13 +1038,23 @@ void addPaymentActivity(Transaction tx)
10381038 }
10391039 }
10401040
1041-
1041+ private void displayBackupReminder ( )
1042+ {
1043+ if ( ! Preferences . Default . ContainsKey ( "backupReminderTimestamp" )
1044+ || Clock . getTimestamp ( ) - long . Parse ( Preferences . Default . Get ( "backupReminderTimestamp" , "" ) . ToString ( ) ) > Config . backupReminder )
1045+ {
1046+ Utils . sendUiCommand ( this , "toggleAnimatedSlider" , "backup-prompt" ) ;
1047+ Preferences . Default . Set ( "backupReminderTimestamp" , Clock . getTimestamp ( ) . ToString ( ) ) ;
1048+ }
1049+ }
10421050
10431051 // Executed every second
10441052 public override void updateScreen ( )
10451053 {
10461054 base . updateScreen ( ) ;
10471055
1056+ displayBackupReminder ( ) ;
1057+
10481058 loadApps ( ) ;
10491059 loadChats ( ) ;
10501060 loadContacts ( ) ;
Original file line number Diff line number Diff line change 232232
233233</ div > <!-- Wrap -->
234234
235- <!--TODO: needs proper logic when to show -->
236235< div class ="action-slide-up-container " id ="backup-prompt ">
237236 < div class ="backup-prompt-icon-container ">
238237 < i class ="fas fa-folder-closed backupIcon "> </ i >
242241 < span class ="body-sm s-text-01 "> *SL{index-backup-prompt-desc}</ span >
243242 </ div >
244243 < div class ="add-mini-app-buttons ">
245- < div class ="spixi-flat-button label-sm " onclick ="confirmInstallCall() ">
244+ < div class ="spixi-flat-button label-sm " onclick ="window.location.href='ixian:backup' ">
246245 *SL{index-backup-prompt-create}
247246 </ div >
248247 < div class ="spixi-flat-button label-sm button outline " onclick ="toggleAnimatedSlider('backup-prompt') ">
Original file line number Diff line number Diff line change @@ -319,15 +319,20 @@ function parseBoolean(value) {
319319
320320function toggleAnimatedSlider ( elementId ) {
321321 const slideUpContainer = document . getElementById ( elementId ) ;
322+ const toolbarEl = document . getElementById ( "toolbar" ) ;
322323
323324 if ( slideUpContainer . classList . contains ( 'active' ) ) {
324325 slideUpContainer . classList . remove ( 'active' ) ;
325326 document . getElementById ( "wrap" ) . classList . remove ( "blurredContent" ) ;
326- document . getElementById ( "toolbar" ) . classList . remove ( "blurredContent" ) ;
327+ if ( toolbarEl != null ) {
328+ toolbarEl . classList . remove ( "blurredContent" ) ;
329+ }
327330 } else {
328331 slideUpContainer . classList . add ( 'active' ) ;
329332 document . getElementById ( "wrap" ) . classList . add ( "blurredContent" ) ;
330- document . getElementById ( "toolbar" ) . classList . add ( "blurredContent" ) ;
333+ if ( toolbarEl != null ) {
334+ toolbarEl . classList . add ( "blurredContent" ) ;
335+ }
331336 }
332337}
333338
You can’t perform that action at this time.
0 commit comments