Skip to content

Commit

Permalink
Step 12.10: Add showAttachments method
Browse files Browse the repository at this point in the history
  • Loading branch information
dotansimha authored and darkbasic committed Jun 13, 2017
1 parent fc1c91d commit b1a3045
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/pages/messages/messages.ts
Expand Up @@ -7,6 +7,7 @@ import * as moment from 'moment';
import { _ } from 'meteor/underscore';
import { MessagesOptionsComponent } from './messages-options';
import { Subscription, Observable, Subscriber } from 'rxjs';
import { MessagesAttachmentsComponent } from './messages-attachments';

@Component({
selector: 'messages-page',
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 b1a3045

Please sign in to comment.