summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--archive.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/archive.c b/archive.c
index 350fdfa..b6960e3 100644
--- a/archive.c
+++ b/archive.c
@@ -103,6 +103,7 @@ int main(int argc, char *argv[]) {
 		if (!pass) errx(EX_CONFIG, ENV_PASSWORD " unset");
 	}
 
+	uint32_t uidNext = 0;
 	enum Atom login = 0;
 	enum Atom examine = atom("EXAMINE");
 	enum Atom thread = atom("THREAD");
@@ -154,8 +155,6 @@ int main(int argc, char *argv[]) {
 				if (next == prev) {
 					examine = 0;
 					fprintf(imap, "ayy LOGOUT\r\n");
-				} else {
-					uidWrite("UIDNEXT", next);
 				}
 			}
 		}
@@ -186,4 +185,5 @@ int main(int argc, char *argv[]) {
 		respFree(resp);
 	}
 	fclose(imap);
+	uidWrite("UIDNEXT", uidNext);
 }
/a>June McEnroe I think originally I didn't want to use the same word as curses WINDOW but it's really much clearer for the user if they're just called windows. UI code probably needs yet another rewrite though. Still feels messy. 2019-02-21Remove ROT13June McEnroe It's just not convenient when it can only do the whole line... 2019-02-21Clean up man pageJune McEnroe 2019-01-26Draw UI before connectingJune McEnroe Otherwise the "Traveling" message isn't visible while connecting. 2019-01-25Avoid unused variable warnings with getyxJune McEnroe 2019-01-25Add GNU/Linux build instructionsJune McEnroe