From: Dessalines Date: Thu, 29 Aug 2019 23:49:58 +0000 (-0700) Subject: Add loading indicators. X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/readmes/%22https:/hacktivis.me/%7Burl%7D?a=commitdiff_plain;h=2d112dbd55f6ad252c593f8c020ae9aadb386de0;p=lemmy.git Add loading indicators. --- diff --git a/ui/src/components/main.tsx b/ui/src/components/main.tsx index 0a7a31e5..513c75d0 100644 --- a/ui/src/components/main.tsx +++ b/ui/src/components/main.tsx @@ -354,6 +354,7 @@ export class Main extends Component { nextPage(i: Main) { i.state.page++; + i.state.loading = true; i.setState(i.state); i.updateUrl(); i.fetchPosts(); @@ -361,6 +362,7 @@ export class Main extends Component { prevPage(i: Main) { i.state.page--; + i.state.loading = true; i.setState(i.state); i.updateUrl(); i.fetchPosts(); @@ -369,6 +371,7 @@ export class Main extends Component { handleSortChange(i: Main, event: any) { i.state.sort = Number(event.target.value); i.state.page = 1; + i.state.loading = true; i.setState(i.state); i.updateUrl(); i.fetchPosts(); @@ -377,6 +380,7 @@ export class Main extends Component { handleTypeChange(i: Main, event: any) { i.state.type_ = Number(event.target.value); i.state.page = 1; + i.state.loading = true; i.setState(i.state); i.updateUrl(); i.fetchPosts();