aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/misc
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-05 14:16:48 +0200
committerChocobozzz <me@florianbigard.com>2019-04-05 14:16:48 +0200
commit8dfceec44a5eec8b0190d1d5076aab0f03a0cb52 (patch)
tree70ff676157240702a2013f2f6d705bfc342a8a81 /client/src/app/shared/misc
parent3a0fb65c61f80b510bce979a45d59d17948745e8 (diff)
downloadPeerTube-8dfceec44a5eec8b0190d1d5076aab0f03a0cb52.tar.gz
PeerTube-8dfceec44a5eec8b0190d1d5076aab0f03a0cb52.tar.zst
PeerTube-8dfceec44a5eec8b0190d1d5076aab0f03a0cb52.zip
video add to playlist component -> onpush strategy
Diffstat (limited to 'client/src/app/shared/misc')
-rw-r--r--client/src/app/shared/misc/screen.service.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/src/app/shared/misc/screen.service.ts b/client/src/app/shared/misc/screen.service.ts
index db481204e..af75569d9 100644
--- a/client/src/app/shared/misc/screen.service.ts
+++ b/client/src/app/shared/misc/screen.service.ts
@@ -18,6 +18,10 @@ export class ScreenService {
18 return this.getWindowInnerWidth() < 500 18 return this.getWindowInnerWidth() < 500
19 } 19 }
20 20
21 isInTouchScreen () {
22 return 'ontouchstart' in window || navigator.msMaxTouchPoints
23 }
24
21 // Cache window inner width, because it's an expensive call 25 // Cache window inner width, because it's an expensive call
22 private getWindowInnerWidth () { 26 private getWindowInnerWidth () {
23 if (this.cacheWindowInnerWidthExpired()) this.refreshWindowInnerWidth() 27 if (this.cacheWindowInnerWidthExpired()) this.refreshWindowInnerWidth()