diff options
Diffstat (limited to 'src/state/models')
-rw-r--r-- | src/state/models/feed-view.ts | 2 | ||||
-rw-r--r-- | src/state/models/post-thread-view.ts | 6 | ||||
-rw-r--r-- | src/state/models/reposted-by-view.ts | 6 | ||||
-rw-r--r-- | src/state/models/votes-view.ts | 6 |
4 files changed, 16 insertions, 4 deletions
diff --git a/src/state/models/feed-view.ts b/src/state/models/feed-view.ts index 503e2a4c6..50906f3b2 100644 --- a/src/state/models/feed-view.ts +++ b/src/state/models/feed-view.ts @@ -393,7 +393,7 @@ export class FeedModel { } private async _loadMore() { - if (!this.hasMore) { + if (!this.hasMore || this.hasError) { return } this._xLoading() diff --git a/src/state/models/post-thread-view.ts b/src/state/models/post-thread-view.ts index ea9d123d0..ebe5b730d 100644 --- a/src/state/models/post-thread-view.ts +++ b/src/state/models/post-thread-view.ts @@ -312,7 +312,11 @@ export class PostThreadViewModel { private async _resolveUri() { const urip = new AtUri(this.params.uri) if (!urip.host.startsWith('did:')) { - urip.host = await this.rootStore.resolveName(urip.host) + try { + urip.host = await this.rootStore.resolveName(urip.host) + } catch (e: any) { + this.error = e.toString() + } } runInAction(() => { this.resolvedUri = urip.toString() diff --git a/src/state/models/reposted-by-view.ts b/src/state/models/reposted-by-view.ts index 4c61bafdc..9e9146899 100644 --- a/src/state/models/reposted-by-view.ts +++ b/src/state/models/reposted-by-view.ts @@ -104,7 +104,11 @@ export class RepostedByViewModel { private async _resolveUri() { const urip = new AtUri(this.params.uri) if (!urip.host.startsWith('did:')) { - urip.host = await this.rootStore.resolveName(urip.host) + try { + urip.host = await this.rootStore.resolveName(urip.host) + } catch (e: any) { + this.error = e.toString() + } } runInAction(() => { this.resolvedUri = urip.toString() diff --git a/src/state/models/votes-view.ts b/src/state/models/votes-view.ts index 6e9130e90..64da6b227 100644 --- a/src/state/models/votes-view.ts +++ b/src/state/models/votes-view.ts @@ -102,7 +102,11 @@ export class VotesViewModel { private async _resolveUri() { const urip = new AtUri(this.params.uri) if (!urip.host.startsWith('did:')) { - urip.host = await this.rootStore.resolveName(urip.host) + try { + urip.host = await this.rootStore.resolveName(urip.host) + } catch (e: any) { + this.error = e.toString() + } } runInAction(() => { this.resolvedUri = urip.toString() |