mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
Run binding when isLoading changes
This commit is contained in:
parent
4a62cdb8fb
commit
8e2838264f
@ -38,6 +38,7 @@ export class GapTile extends SimpleTile {
|
||||
} catch (err) {
|
||||
console.error(`room.fillGap(): ${err.message}:\n${err.stack}`);
|
||||
this._error = err;
|
||||
this._loading = false;
|
||||
this.emitChange("error");
|
||||
if (err instanceof ConnectionError) {
|
||||
/*
|
||||
|
@ -30,16 +30,17 @@ export class GapView extends TemplateView {
|
||||
isAtTop: vm => vm.isAtTop,
|
||||
};
|
||||
return t.li({ className }, [
|
||||
t.map(vm => vm.error,
|
||||
(error, t, vm) => {
|
||||
t.map(vm => vm.isLoading,
|
||||
(isLoading, t, vm) => {
|
||||
let elements;
|
||||
const error = vm.error;
|
||||
if (error) {
|
||||
elements = [t.strong(() => error.message)];
|
||||
if (error.showSpinner) {
|
||||
elements.unshift(spinner(t));
|
||||
}
|
||||
}
|
||||
else if (vm.isLoading) {
|
||||
else if (isLoading) {
|
||||
elements = [spinner(t), t.span(vm.i18n`Loading more messages …`)];
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user