elie222 / inbox-zero

Open source email app to reach inbox zero fast.
https://www.getinboxzero.com
GNU Affero General Public License v3.0
2.17k stars 194 forks source link

feat : Bulk unsubscribe page: archive all #184

Closed varunguleriaCodes closed 1 month ago

varunguleriaCodes commented 1 month ago

Hi @elie222 button for bulk archive my approach:

  1. As we can't get all the mails from gmail api one time and can't skip the exsisting numbers that we got, I am making threads array and archiving some and pulling again.

Let me know if there can be another approach that I can do this with. Issue -> https://github.com/elie222/inbox-zero/issues/176

vercel[bot] commented 1 month ago

@varunguleriaCodes is attempting to deploy a commit to the Inbox Zero Team on Vercel.

A member of the Team first needs to authorize it.

CLAassistant commented 1 month ago

CLA assistant check
All committers have signed the CLA.

elie222 commented 1 month ago

Hey,

There was a push this week that added this functionality already. If you log in and click the three dots you should see the delete / archive all. I don't remember if it paginates through the results or just does one page.

varunguleriaCodes commented 1 month ago

Hey @elie222 , yeah just checked it is present , I also checked the code (pr for archive all ->https://github.com/elie222/inbox-zero/commit/90ef549f69aaec7a27c0edc72f22d6b7c2de81bc ) , I think it is for one page only.

elie222 commented 1 month ago

Hey @elie222 , yeah just checked it is present , I also checked the code (pr for archive all ->90ef549 ) , I think it is for one page only.

what do you mean by one page only?

varunguleriaCodes commented 1 month ago

The api for getting all the threads run once, than we are archiving those threads. Gmail allows you get 100 threads details at a time. So once these 100 are done, there are no calls to get more threads after that. So if emails > 100 the code is not archiving those.

Hey @elie222 , yeah just checked it is present , I also checked the code (pr for archive all ->90ef549 ) , I think it is for one page only.

what do you mean by one page only?

elie222 commented 1 month ago

The api for getting all the threads run once, than we are archiving those threads. Gmail allows you get 100 threads details at a time. So once these 100 are done, there are no calls to get more threads after that. So if emails > 100 the code is not archiving those.

Hey @elie222 , yeah just checked it is present , I also checked the code (pr for archive all ->90ef549 ) , I think it is for one page only.

what do you mean by one page only?

Correct. I updated it yesterday to grab 500 emails instead. Pagination would be needed to do more than that. Or the user would need to click twice. For now it's a large enough so I'm not going to touch it, and they'll click it twice if needed.