mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 12:13:48 +01:00
Better progress bar
This commit is contained in:
parent
56a9d2c35a
commit
a5fea663f1
@ -51,10 +51,18 @@
|
||||
|
||||
Progress.start();
|
||||
|
||||
const fetched = false;
|
||||
|
||||
// チャンネル概要読み込み
|
||||
this.api('channels/show', {
|
||||
channel_id: this.id
|
||||
}).then(channel => {
|
||||
Progress.done();
|
||||
if (fetched) {
|
||||
Progress.done();
|
||||
} else {
|
||||
Progress.set(0.5);
|
||||
fetched = true;
|
||||
}
|
||||
|
||||
this.update({
|
||||
fetching: false,
|
||||
@ -64,9 +72,17 @@
|
||||
document.title = channel.title + ' | Misskey'
|
||||
});
|
||||
|
||||
// 投稿読み込み
|
||||
this.api('channels/posts', {
|
||||
channel_id: this.id
|
||||
}).then(posts => {
|
||||
if (fetched) {
|
||||
Progress.done();
|
||||
} else {
|
||||
Progress.set(0.5);
|
||||
fetched = true;
|
||||
}
|
||||
|
||||
this.update({
|
||||
postsFetching: false,
|
||||
posts: posts
|
||||
|
Loading…
Reference in New Issue
Block a user