The app has two methods to access email provider: Gmail API and IMAP/SMTP.
I'd like to update the app as follows: app stays the same when IMAP is used. When we use Gmail API, I'd like to view a list of conversations instead of list of emails when I open any folder in inbox.
Specifically, with Gmail, at the moment we:
After update, with Gmail, we will:
The technical details above, eg regarding Gmail API usage, may not be 100% precise but it should give you the idea.
The unfortunate part is that somewhere in controller code (both inbox and message view) you'll have to decide if we are using IMAP or Gmail API and branch accordingly. Or do you think it would be better to have completely different controllers, maybe with shared bases? One for IMAP and one for Gmail API?
The app has two methods to access email provider: Gmail API and IMAP/SMTP.
I'd like to update the app as follows: app stays the same when IMAP is used. When we use Gmail API, I'd like to view a list of conversations instead of list of emails when I open any folder in inbox.
Specifically, with Gmail, at the moment we:
After update, with Gmail, we will:
labelIdsfor a particular folder. Maybe you'll have to threads.get the individual threads to show the details: https://developers.google.com/gmail/api/reference/rest/v1/users.threads/get (like subject etc of each thread in the list)(1)or(3)or similar under the date.parseProcessMsglike we do nowThe technical details above, eg regarding Gmail API usage, may not be 100% precise but it should give you the idea.
The unfortunate part is that somewhere in controller code (both inbox and message view) you'll have to decide if we are using IMAP or Gmail API and branch accordingly. Or do you think it would be better to have completely different controllers, maybe with shared bases? One for IMAP and one for Gmail API?