Skip to content

Commit

Permalink
Show the number of conversations you're about to copy/move
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmervdl committed Sep 30, 2016
1 parent 3bf5024 commit b474e33
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
11 changes: 11 additions & 0 deletions Nostalgy4MailApp/PrivateMailHeaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,19 @@
@property(retain, nonatomic) TableViewManager *tableViewManager;
@end

@interface ConversationSet : NSObject
@property(nonatomic) unsigned long long unreadMessageCount; // @synthesize unreadMessageCount=_unreadMessageCount;
@property(nonatomic) unsigned long long totalMessageCount; // @synthesize totalMessageCount=_totalMessageCount;
@property(readonly, nonatomic) unsigned long long count;
@end

@interface MessageSelection : NSObject
@property(readonly, copy, nonatomic) ConversationSet *conversations;
@end

@interface MessageViewer : NSResponder
@property(readonly, nonatomic) TableViewManager *tableManager;
@property(readonly, nonatomic) MessageSelection *messageSelection;
- (void)copyMessagesToMailbox:(id)arg1;
- (void)moveMessagesToMailbox:(id)arg1;
- (void)archiveMessages:(id)arg1;
Expand Down
12 changes: 10 additions & 2 deletions Nostalgy4MailApp/SearchManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,23 @@ - (IBAction)moveToFolder:(id)sender {
MessageViewer *viewer = [self frontmostMessageViewer];
if (viewer != nil) {
id delegate = [[[MoveMessageDelegate alloc] initForMessageViewer:viewer] autorelease];
[[SearchPopup popupWithDelegate:delegate] showWithSender:sender andTitle:@"Move to folder"];
[[SearchPopup popupWithDelegate:delegate]
showWithSender:sender
andTitle:[NSString
stringWithFormat:NSLocalizedString(@"Move %d conversation", @"Move %d conversations"),
viewer.messageSelection.conversations.count]];
}
}

- (IBAction)copyToFolder:(id)sender {
MessageViewer *viewer = [self frontmostMessageViewer];
if (viewer != nil) {
id delegate = [[[CopyMessageDelegate alloc] initForMessageViewer:viewer] autorelease];
[[SearchPopup popupWithDelegate:delegate] showWithSender:sender andTitle:@"Copy to folder"];
[[SearchPopup popupWithDelegate:delegate]
showWithSender:sender
andTitle:[NSString
stringWithFormat:NSLocalizedString(@"Copy %d conversation", @"Copy %d conversations"),
viewer.messageSelection.conversations.count]];
}
}

Expand Down

0 comments on commit b474e33

Please sign in to comment.