Skip to content

Commit

Permalink
When opening an ImapFolder, don't set it's PermFlags to None if anoth…
Browse files Browse the repository at this point in the history
…er folder was selected

Instead, set the previously selected folder's PermFlags to None. D'oh!

Fixes issue #153
  • Loading branch information
jstedfast committed Feb 19, 2015
1 parent d43663d commit d0c4cc2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions MailKit/Net/Imap/ImapFolder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,9 @@ static void QResyncFetch (ImapEngine engine, ImapCommand ic, int index)
}

if (Engine.Selected != null && Engine.Selected != this) {
Engine.Selected.PermanentFlags = MessageFlags.None;
Engine.Selected.AcceptedFlags = MessageFlags.None;
Engine.Selected.Access = FolderAccess.None;
PermanentFlags = MessageFlags.None;
}

Engine.State = ImapEngineState.Selected;
Expand Down Expand Up @@ -390,8 +391,9 @@ static void QResyncFetch (ImapEngine engine, ImapCommand ic, int index)
}

if (Engine.Selected != null && Engine.Selected != this) {
Engine.Selected.PermanentFlags = MessageFlags.None;
Engine.Selected.AcceptedFlags = MessageFlags.None;
Engine.Selected.Access = FolderAccess.None;
PermanentFlags = MessageFlags.None;
}

Engine.State = ImapEngineState.Selected;
Expand Down

0 comments on commit d0c4cc2

Please sign in to comment.