This repository was archived by the owner on Jan 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +16
-19
lines changed Expand file tree Collapse file tree 4 files changed +16
-19
lines changed Original file line number Diff line number Diff line change @@ -6974,15 +6974,14 @@ class UvalibModelRealtimeOverride extends UvalibModelFBDB {
6974
6974
}
6975
6975
6976
6976
_checkTime ( value ) {
6977
- // see if we can parse the db value as a datetime
6978
- // var d = DateTime.fromISO(value);
6979
- var d = DateTime . fromSeconds ( value ) ;
6977
+ // see if we can parse the db value as a datetime
6978
+ var d = DateTime . fromMillis ( value ) ;
6980
6979
6981
- if ( DateTime . local ( ) < d ) {
6980
+ if ( DateTime . local ( ) . toMillis ( ) < d . toMillis ( ) ) {
6982
6981
// poll every few minutes to see if need to continue showing the override
6983
6982
this . _adjustDom ( this . defaultValue ) ;
6984
- this . _timeout = window . setTimeout ( function ( ) { this . _checkTime ( value ) ; } . bind ( this ) , 6000 ) ;
6985
- } else {
6983
+ this . _timeout = window . setTimeout ( function ( ) { this . _checkTime ( value ) ; } . bind ( this ) , 60000 ) ;
6984
+ } else {
6986
6985
this . _adjustDom ( ) ; // show the default
6987
6986
}
6988
6987
}
Original file line number Diff line number Diff line change @@ -6974,15 +6974,14 @@ class UvalibModelRealtimeOverride extends UvalibModelFBDB {
6974
6974
}
6975
6975
6976
6976
_checkTime ( value ) {
6977
- // see if we can parse the db value as a datetime
6978
- // var d = DateTime.fromISO(value);
6979
- var d = DateTime . fromSeconds ( value ) ;
6977
+ // see if we can parse the db value as a datetime
6978
+ var d = DateTime . fromMillis ( value ) ;
6980
6979
6981
- if ( DateTime . local ( ) < d ) {
6980
+ if ( DateTime . local ( ) . toMillis ( ) < d . toMillis ( ) ) {
6982
6981
// poll every few minutes to see if need to continue showing the override
6983
6982
this . _adjustDom ( this . defaultValue ) ;
6984
- this . _timeout = window . setTimeout ( function ( ) { this . _checkTime ( value ) ; } . bind ( this ) , 6000 ) ;
6985
- } else {
6983
+ this . _timeout = window . setTimeout ( function ( ) { this . _checkTime ( value ) ; } . bind ( this ) , 60000 ) ;
6984
+ } else {
6986
6985
this . _adjustDom ( ) ; // show the default
6987
6986
}
6988
6987
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @uvalib/uvalib-models" ,
3
3
"main" : " uvalib-models.js" ,
4
- "version" : " 0.3.41 " ,
4
+ "version" : " 0.3.42 " ,
5
5
"dependencies" : {
6
6
"@uvalib/uvalib-account" : " ^0.1.19" ,
7
7
"luxon" : " ^1.25.0" ,
Original file line number Diff line number Diff line change @@ -46,15 +46,14 @@ export default class UvalibModelRealtimeOverride extends UvalibModelFBDB {
46
46
}
47
47
48
48
_checkTime ( value ) {
49
- // see if we can parse the db value as a datetime
50
- // var d = DateTime.fromISO(value);
51
- var d = DateTime . fromSeconds ( value ) ;
49
+ // see if we can parse the db value as a datetime
50
+ var d = DateTime . fromMillis ( value ) ;
52
51
53
- if ( DateTime . local ( ) < d ) {
52
+ if ( DateTime . local ( ) . toMillis ( ) < d . toMillis ( ) ) {
54
53
// poll every few minutes to see if need to continue showing the override
55
54
this . _adjustDom ( this . defaultValue ) ;
56
- this . _timeout = window . setTimeout ( function ( ) { this . _checkTime ( value ) } . bind ( this ) , 6000 ) ;
57
- } else {
55
+ this . _timeout = window . setTimeout ( function ( ) { this . _checkTime ( value ) } . bind ( this ) , 60000 ) ;
56
+ } else {
58
57
this . _adjustDom ( ) ; // show the default
59
58
}
60
59
}
You can’t perform that action at this time.
0 commit comments