lib/imap/backup/setup/account.rb in imap-backup-6.0.1 vs lib/imap/backup/setup/account.rb in imap-backup-6.1.0

- old
+ new

@@ -35,10 +35,11 @@ modify_backup_path menu choose_folders menu modify_multi_fetch_size menu modify_server menu modify_connection_options menu + toggle_reset_seen_flags_after_fetch menu test_connection menu delete_account menu menu.choice("(q) return to main menu") { throw :done } menu.hidden("quit") { throw :done } end @@ -98,9 +99,22 @@ rescue JSON::ParserError Kernel.puts "Malformed JSON, please try again" highline.ask "Press a key " end end + end + end + + def toggle_reset_seen_flags_after_fetch(menu) + menu_item = + if account.reset_seen_flags_after_fetch + "don't fix changes to unread flags during download" + else + "fix changes to unread flags during download" + end + new_value = account.reset_seen_flags_after_fetch ? nil : true + menu.choice(menu_item) do + account.reset_seen_flags_after_fetch = new_value end end def test_connection(menu) menu.choice("test connection") do