* closes #1900

* fix refresh bug

Co-authored-by: Matt Hill <matthewonthemoon@gmail.com>
This commit is contained in:
Aiden McClelland
2022-11-09 11:54:05 -07:00
parent b9e4a66fdc
commit c1ac66f6e5
3 changed files with 7 additions and 4 deletions

View File

@@ -47,7 +47,7 @@ export class HomePage {
} }
async ionViewDidEnter() { async ionViewDidEnter() {
this.loaded = true // needed to accomodate autoHight="true" on swiper. Otherwise Swiper height might be 0 when navigatging *to* this page from later page. Happens on refresh. this.loaded = true // needed to accommodate autoHight="true" on swiper. Otherwise Swiper height might be 0 when navigating *to* this page from later page. Happens on refresh.
if (this.swiper) { if (this.swiper) {
this.swiper.allowTouchMove = false this.swiper.allowTouchMove = false
} }

View File

@@ -1,5 +1,9 @@
<alert *ngIf="show$ | async" header="Refresh needed" (dismiss)="onDismiss()"> <alert *ngIf="show$ | async" header="Refresh Needed" (dismiss)="onDismiss()">
Your user interface is cached and out of date. Hard refresh the page to get Your user interface is cached and out of date. Hard refresh the page to get
the latest UI. the latest UI.
<a alertButton class="enter-click" href=".">Refresh Page</a> <ul>
<li><b>On Mac</b>: cmd + shift + R</li>
<li><b>On Linux/Windows</b>: ctrl + shift + R</li>
</ul>
<a alertButton class="enter-click" role="cancel">Ok</a>
</alert> </alert>

View File

@@ -6,7 +6,6 @@ import { PatchDB } from 'patch-db-client'
import { ConfigService } from '../../../services/config.service' import { ConfigService } from '../../../services/config.service'
import { DataModel } from 'src/app/services/patch-db/data-model' import { DataModel } from 'src/app/services/patch-db/data-model'
// Watch for connection status
@Injectable({ providedIn: 'root' }) @Injectable({ providedIn: 'root' })
export class RefreshAlertService extends Observable<boolean> { export class RefreshAlertService extends Observable<boolean> {
private readonly stream$ = this.patch.watch$('server-info', 'version').pipe( private readonly stream$ = this.patch.watch$('server-info', 'version').pipe(