Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: オフライン時に大室櫻子が出てこない #5480

Merged
merged 2 commits into from Oct 4, 2019

Conversation

mei23
Copy link
Contributor

@mei23 mei23 commented Oct 3, 2019

Summary

PWA等でオフライン時のエラー画像が
ローカルassetsにあってServiceWorkerキャッシュにも入れてるにもかかわらず
リンク先がリモートなので表示されないのを修正

https://github.com/syuilo/misskey/blob/96b88ee369bc6d6d5510b0df96b96fb08088268f/src/client/app/sw.js#L20-L25

image

でもこれをやると、非PWAで該当サーバーだけがオフラインでSWのキャッシュに画像がない場合は
表示されなくなりそうだからどうしよう。

Data-URIが良さそうだけど過去にやっててやめた跡があるし

@mei23 mei23 requested a review from syuilo October 3, 2019 08:31
@rinsuki
Copy link
Contributor

rinsuki commented Oct 3, 2019

onerrorでインターネットから取得に切り替えるとか

@u1-liquid
Copy link
Contributor

clientのboot.jsとかその辺で一度fetchしておくとか

@mei23
Copy link
Contributor Author

mei23 commented Oct 3, 2019

onerrorにしました

@syuilo syuilo merged commit 533884d into misskey-dev:develop Oct 4, 2019
@syuilo
Copy link
Member

syuilo commented Oct 4, 2019

ありがとうございます👍👍👍

mei23 added a commit to mei23/misskey that referenced this pull request Oct 6, 2019
* Fix: オフライン時に大室櫻子が出てこない

* use onerror
@mei23 mei23 deleted the mei-91003-sakurako branch October 11, 2019 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants