Improve handling of connection loss
This commit is contained in:
@@ -393,7 +393,7 @@ export class FeedModel {
|
||||
}
|
||||
|
||||
private async _loadMore() {
|
||||
if (!this.hasMore) {
|
||||
if (!this.hasMore || this.hasError) {
|
||||
return
|
||||
}
|
||||
this._xLoading()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user