nextPage(i: Main) {
i.state.page++;
+ i.state.loading = true;
i.setState(i.state);
i.updateUrl();
i.fetchPosts();
prevPage(i: Main) {
i.state.page--;
+ i.state.loading = true;
i.setState(i.state);
i.updateUrl();
i.fetchPosts();
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();
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();