Skip to content

Commit

Permalink
closes #1900
Browse files Browse the repository at this point in the history
  • Loading branch information
MattDHill authored and dr-bonez committed Nov 9, 2022
1 parent 14128b6 commit 50f0d9f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class HomePage {
}

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) {
this.swiper.allowTouchMove = false
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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
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>
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import { PatchDB } from 'patch-db-client'
import { ConfigService } from '../../../services/config.service'
import { DataModel } from 'src/app/services/patch-db/data-model'

// Watch for connection status
@Injectable({ providedIn: 'root' })
export class RefreshAlertService extends Observable<boolean> {
private readonly stream$ = this.patch.watch$('server-info', 'version').pipe(
map(version => !!this.emver.compare(this.config.version, version)),
map(version => !this.emver.compare(this.config.version, version)),
endWith(false),
)

Expand Down

0 comments on commit 50f0d9f

Please sign in to comment.