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 Oct 16, 2017
1 parent 7f3694f commit 3194ac2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/pages/messages/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import * as moment from 'moment';
import * as _ from 'lodash';
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 3194ac2

Please sign in to comment.