Skip to content

Commit

Permalink
Step 11.10: Add showAttachments method
Browse files Browse the repository at this point in the history
  • Loading branch information
dotansimha authored and DAB0mB committed Feb 26, 2017
1 parent cf2ff67 commit 278a66d
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion client/imports/pages/messages/messages.ts
Expand Up @@ -6,6 +6,7 @@ import * as Moment from 'moment';
import { Observable, Subscription, Subscriber } from 'rxjs';
import { Messages } from '../../../../imports/collections';
import { Chat, Message, MessageType } from '../../../../imports/models';
import { MessagesAttachmentsComponent } from './messages-attachments';
import { MessagesOptionsComponent } from './messages-options';
import template from './messages.html';

Expand Down Expand Up @@ -211,4 +212,18 @@ export class MessagesPage implements OnInit, OnDestroy {
this.message = '';
});
}
}

showAttachments(): void {
const popover = this.popoverCtrl.create(MessagesAttachmentsComponent, {
chat: this.selectedChat
}, {
cssClass: 'attachments-popover'
});

popover.onDidDismiss((params) => {
// TODO: Handle result
});

popover.present();
}
}

0 comments on commit 278a66d

Please sign in to comment.