Merge pull request #2822 from crazyserver/MOBILE-3320
MOBILE-3320 messages: Fix animations on message screenmain
commit
3a3a441f7b
|
@ -163,9 +163,16 @@ export class AddonMessagesDiscussionPage implements OnInit, OnDestroy, AfterView
|
||||||
this.showInfo = !backViewPage || !CoreTextUtils.matchesGlob(backViewPage, '**/user/profile');
|
this.showInfo = !backViewPage || !CoreTextUtils.matchesGlob(backViewPage, '**/user/profile');
|
||||||
|
|
||||||
this.route.queryParams.subscribe(async (params) => {
|
this.route.queryParams.subscribe(async (params) => {
|
||||||
this.loaded = false;
|
const oldConversationId = this.conversationId;
|
||||||
|
const oldUserId = this.userId;
|
||||||
this.conversationId = CoreNavigator.getRouteNumberParam('conversationId', { params }) || undefined;
|
this.conversationId = CoreNavigator.getRouteNumberParam('conversationId', { params }) || undefined;
|
||||||
this.userId = CoreNavigator.getRouteNumberParam('userId', { params }) || undefined;
|
this.userId = CoreNavigator.getRouteNumberParam('userId', { params }) || undefined;
|
||||||
|
|
||||||
|
if (oldConversationId != this.conversationId || oldUserId != this.userId) {
|
||||||
|
// Showing reload again can break animations.
|
||||||
|
this.loaded = false;
|
||||||
|
}
|
||||||
|
|
||||||
this.showKeyboard = CoreNavigator.getRouteBooleanParam('showKeyboard', { params }) || false;
|
this.showKeyboard = CoreNavigator.getRouteBooleanParam('showKeyboard', { params }) || false;
|
||||||
|
|
||||||
await this.fetchData();
|
await this.fetchData();
|
||||||
|
|
|
@ -33,7 +33,6 @@ export class CoreAnimations {
|
||||||
static readonly SLIDE_IN_OUT = trigger('coreSlideInOut', [
|
static readonly SLIDE_IN_OUT = trigger('coreSlideInOut', [
|
||||||
// Enter animation.
|
// Enter animation.
|
||||||
transition('void => fromLeft', [
|
transition('void => fromLeft', [
|
||||||
style({ transform: 'translateX(0)', opacity: 1 }),
|
|
||||||
animate(300, keyframes([
|
animate(300, keyframes([
|
||||||
style({ opacity: 0, transform: 'translateX(-100%)', offset: 0 }),
|
style({ opacity: 0, transform: 'translateX(-100%)', offset: 0 }),
|
||||||
style({ opacity: 1, transform: 'translateX(5%)', offset: 0.7 }),
|
style({ opacity: 1, transform: 'translateX(5%)', offset: 0.7 }),
|
||||||
|
@ -42,7 +41,6 @@ export class CoreAnimations {
|
||||||
]),
|
]),
|
||||||
// Leave animation.
|
// Leave animation.
|
||||||
transition('fromLeft => void', [
|
transition('fromLeft => void', [
|
||||||
style({ transform: 'translateX(-100%)', opacity: 0 }),
|
|
||||||
animate(300, keyframes([
|
animate(300, keyframes([
|
||||||
style({ opacity: 1, transform: 'translateX(0)', offset: 0 }),
|
style({ opacity: 1, transform: 'translateX(0)', offset: 0 }),
|
||||||
style({ opacity: 1, transform: 'translateX(5%)', offset: 0.3 }),
|
style({ opacity: 1, transform: 'translateX(5%)', offset: 0.3 }),
|
||||||
|
@ -51,7 +49,6 @@ export class CoreAnimations {
|
||||||
]),
|
]),
|
||||||
// Enter animation.
|
// Enter animation.
|
||||||
transition('void => fromRight', [
|
transition('void => fromRight', [
|
||||||
style({ transform: 'translateX(0)', opacity: 1 }),
|
|
||||||
animate(300, keyframes([
|
animate(300, keyframes([
|
||||||
style({ opacity: 0, transform: 'translateX(100%)', offset: 0 }),
|
style({ opacity: 0, transform: 'translateX(100%)', offset: 0 }),
|
||||||
style({ opacity: 1, transform: 'translateX(-5%)', offset: 0.7 }),
|
style({ opacity: 1, transform: 'translateX(-5%)', offset: 0.7 }),
|
||||||
|
@ -60,7 +57,6 @@ export class CoreAnimations {
|
||||||
]),
|
]),
|
||||||
// Leave animation.
|
// Leave animation.
|
||||||
transition('fromRight => void', [
|
transition('fromRight => void', [
|
||||||
style({ transform: 'translateX(-100%)', opacity: 0 }),
|
|
||||||
animate(300, keyframes([
|
animate(300, keyframes([
|
||||||
style({ opacity: 1, transform: 'translateX(0)', offset: 0 }),
|
style({ opacity: 1, transform: 'translateX(0)', offset: 0 }),
|
||||||
style({ opacity: 1, transform: 'translateX(-5%)', offset: 0.3 }),
|
style({ opacity: 1, transform: 'translateX(-5%)', offset: 0.3 }),
|
||||||
|
|
Loading…
Reference in New Issue