Browse Source

Fix closing tabs in right sidebar

Fix opening emoticons
master
morethanwords 4 years ago
parent
commit
482bba88ce
  1. 2
      src/components/emoticonsDropdown/index.ts
  2. 11
      src/components/transition.ts
  3. 7
      src/lib/appManagers/appStickersManager.ts
  4. 7
      src/scss/partials/_preloader.scss

2
src/components/emoticonsDropdown/index.ts

@ -156,7 +156,9 @@ export class EmoticonsDropdown {
}); });
(this.tabsEl.children[1] as HTMLLIElement).click(); // set emoji tab (this.tabsEl.children[1] as HTMLLIElement).click(); // set emoji tab
if(this.tabs[0].init) {
this.tabs[0].init(); // onTransitionEnd не вызовется, т.к. это первая открытая вкладка this.tabs[0].init(); // onTransitionEnd не вызовется, т.к. это первая открытая вкладка
}
rootScope.on('peer_changed', this.checkRights); rootScope.on('peer_changed', this.checkRights);
this.checkRights(); this.checkRights();

11
src/components/transition.ts

@ -161,7 +161,7 @@ const Transition = (content: HTMLElement, animationFunction: TransitionFunction,
} }
if(_from/* && false */) { if(_from/* && false */) {
onTransitionEndCallbacks.set(_from, () => { const callback = () => {
_from.classList.remove('active', 'from'); _from.classList.remove('active', 'from');
if(onTransitionEndCallback) { if(onTransitionEndCallback) {
@ -169,7 +169,16 @@ const Transition = (content: HTMLElement, animationFunction: TransitionFunction,
} }
onTransitionEndCallbacks.delete(_from); onTransitionEndCallbacks.delete(_from);
};
if(to) {
onTransitionEndCallbacks.set(_from, callback);
} else {
const timeout = window.setTimeout(callback, transitionTime);
onTransitionEndCallbacks.set(_from, () => {
clearTimeout(timeout);
}); });
}
if(!animationDeferred) { if(!animationDeferred) {
animationDeferred = deferredPromise<void>(); animationDeferred = deferredPromise<void>();

7
src/lib/appManagers/appStickersManager.ts

@ -61,14 +61,19 @@ export class AppStickersManager {
} }
} }
try {
const stickerSet = await apiManager.invokeApi('messages.getStickerSet', { const stickerSet = await apiManager.invokeApi('messages.getStickerSet', {
stickerset: this.getStickerSetInput(set) stickerset: this.getStickerSetInput(set)
}); });
delete this.getStickerSetPromises[set.id];
this.saveStickerSet(stickerSet, set.id); this.saveStickerSet(stickerSet, set.id);
resolve(stickerSet); resolve(stickerSet);
} catch(err) {
resolve(null);
}
delete this.getStickerSetPromises[set.id];
}); });
} }

7
src/scss/partials/_preloader.scss

@ -2,7 +2,8 @@ $transition: .2s ease-in-out;
.preloader { .preloader {
&-circular { &-circular {
animation: rotate 2s linear infinite; //animation: rotate 2s linear infinite;
animation: rotate 1s linear infinite;
height: 100%; height: 100%;
transform-origin: center center; transform-origin: center center;
/* width: 100%; */ /* width: 100%; */
@ -80,6 +81,10 @@ $transition: .2s ease-in-out;
&.preloader-swing { &.preloader-swing {
cursor: default; cursor: default;
.you-spin-me-round {
animation: rotate 1s linear infinite;
}
.preloader-path-new { .preloader-path-new {
//animation: dashNew 1.5s ease-in-out infinite; //animation: dashNew 1.5s ease-in-out infinite;
stroke-dasharray: 112.36, 149.82; stroke-dasharray: 112.36, 149.82;

Loading…
Cancel
Save