Merge pull request #2822 from crazyserver/MOBILE-3320
MOBILE-3320 messages: Fix animations on message screen
This commit is contained in:
		
						commit
						3a3a441f7b
					
				| @ -163,9 +163,16 @@ export class AddonMessagesDiscussionPage implements OnInit, OnDestroy, AfterView | ||||
|         this.showInfo = !backViewPage || !CoreTextUtils.matchesGlob(backViewPage, '**/user/profile'); | ||||
| 
 | ||||
|         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.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; | ||||
| 
 | ||||
|             await this.fetchData(); | ||||
|  | ||||
| @ -33,38 +33,34 @@ export class CoreAnimations { | ||||
|     static readonly SLIDE_IN_OUT = trigger('coreSlideInOut', [ | ||||
|         // Enter animation.
 | ||||
|         transition('void => fromLeft', [ | ||||
|             style({ transform: 'translateX(0)', opacity: 1 }), | ||||
|             animate(300, keyframes([ | ||||
|                 style({ opacity: 0, transform: 'translateX(-100%)', offset: 0 }), | ||||
|                 style({ opacity: 1, transform: 'translateX(5%)', offset: 0.7 }), | ||||
|                 style({ opacity: 1, transform: 'translateX(0)',     offset: 1.0 }), | ||||
|                 style({ opacity: 1, transform: 'translateX(0)', offset: 1.0 }), | ||||
|             ])), | ||||
|         ]), | ||||
|         // Leave animation.
 | ||||
|         transition('fromLeft => void', [ | ||||
|             style({ transform: 'translateX(-100%)', opacity: 0 }), | ||||
|             animate(300, keyframes([ | ||||
|                 style({ opacity: 1, transform: 'translateX(0)', offset: 0 }), | ||||
|                 style({ opacity: 1, transform: 'translateX(5%)', offset: 0.3 }), | ||||
|                 style({ opacity: 0, transform: 'translateX(-100%)',     offset: 1.0 }), | ||||
|                 style({ opacity: 0, transform: 'translateX(-100%)', offset: 1.0 }), | ||||
|             ])), | ||||
|         ]), | ||||
|         // Enter animation.
 | ||||
|         transition('void => fromRight', [ | ||||
|             style({ transform: 'translateX(0)', opacity: 1 }), | ||||
|             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(0)', offset: 1.0 }), | ||||
|             ])), | ||||
|         ]), | ||||
|         // Leave animation.
 | ||||
|         transition('fromRight => void', [ | ||||
|             style({ transform: 'translateX(-100%)', opacity: 0 }), | ||||
|             animate(300, keyframes([ | ||||
|                 style({ opacity: 1, transform: 'translateX(0)', offset: 0 }), | ||||
|                 style({ opacity: 1, transform: 'translateX(-5%)', offset: 0.3 }), | ||||
|                 style({ opacity: 0, transform: 'translateX(100%)',     offset: 1.0 }), | ||||
|                 style({ opacity: 0, transform: 'translateX(100%)', offset: 1.0 }), | ||||
|             ])), | ||||
|         ]), | ||||
|     ]); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user