Closed Bug 829527 Opened 11 years ago Closed 8 years ago

[Email] There is no way to manually trigger synchronization of the folder list

Categories

(Firefox OS Graveyard :: Gaia::E-Mail, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: pzhang, Unassigned)

References

Details

(Keywords: feature, foxfood)

I added new sub-folder in the Hotmail on Laptop, then I tapped the refresh button of the Email button, the folder structure is not refreshed, the sub-folder I added can not be shown.
Maybe the refresh button is not to be used for re-fetching the folders, but I just can find any ways to do it.
The refresh button only refreshes the currently displayed folder.  In the case of IMAP this is even further constrained and only the time range covered by the visible/buffered messages is synchronized.

The folder list is synchronized at most once per day on e-mail app startup.

I think the UI affordance I was visualizing would be to have a refresh button on the folder list that could trigger our folder list sync logic.
Summary: [Email] The folder structure of Hotmail is not refreshed when tapping the refresh button. → [Email] There is no way to manually trigger synchronization of the folder list
Andrew, any updates on this? I ran into this behavior today as I was re-arranging my inbox and shuffling things around adding/removing/nesting folders and none of that has been reflected in the FFXOS email client yet :\
No, but this shouldn't be too hard, just need UX guidance...

Juwei, any ideas on how to best expose the ability to refresh the folder list from the server?  Currently, we automatically refresh the folder list when starting the app and it has been at least 24 hours since we last refreshed.  Syncing a folder list takes a relatively small amount of bandwidth per-folder (with most users having relatively few folders), and it usually should be quite easy for a server to do.  (Compared with getting unread counts/etc. on each folder, which can be expensive for the server.)  In the future we may be able to make folder syncing faster by leveraging some IMAP/JMAP extensions, etc.

We chose 24 hours because the understanding was data was relatively expensive in the target market and that way we managed to avoid competing with ourselves for sync when the app is started.  Also, it avoided some UI edge cases where the user can be looking at a folder that no longer exists.  (But that's now pretty easy to deal with thanks to various cleanups and improvements by :jrburke.)

Although they are larger in scope because they involve strings, I would expect this functionality to probably live near the functionality for creating and deleting folders.  (And the super-fancy feature would be to move a folder.  Because that's not an atomic thing, we probably would not want to consider that anytime soon.

Options that jump out at me:

1) Hide the UI for folder management in the account settings area.  For now, just have "refresh folder list", but in the future it could be the means of triggering folder addition (show a picker, enter a name) and folder deletion (show a picker, show a confirm since it's not undo-able).

2) Include some kind of ellipsis button on the drawer to let the user bring up a menu with the above options.

3) Long-press context menu on the contents of the drawer.  I think we abandoned long-press tricks, so this probably would not be idiomatic.

4) Include a refresh icon directly in the drawer somewhere.  This might be confusing since the drawer does not hide the existing refresh button and then the user would see two at the same time.

5) Trigger folder syncs immediately if the user is doing something that seems like they're trying to do that.  For example:
- Hitting the refresh button a lot on a folder.
- Opening and closing the drawer a lot.
- Closing the email app and reopening it.

6) Sync folder lists more frequently than every 24 hours.  For example, we could sync every time the email app is explicitly started, and automatically do it if we were in the background and the user switches back to it and it has been an hour.
Flags: needinfo?(jhuang)
7) If the user is on WiFi, sync folder list at app startup, defined account sync interval, and on refresh button.

I think that'd be safe logic since WiFi is almost never pay as you go.
The most reasonable way is to sync folder list automatically.
Option 5) in comment 4 might be a smart way to do it but it would be even better that checking and syncing folder list every time when users open email app.
Flags: needinfo?(jhuang)
I'm also a user who uses multiple folders. This is a feature I'd love to have on my dogfood device.
Keywords: feature, foxfood
Andrew,

I added some folders to my Mozila account more than 2 days ago and did not get the list updated so far. Is there some way to debug that to see if something is wrong on my end?

Thanks,

Andre
Flags: needinfo?(bugmail)
Things to check:
1) Make sure you closed the email app from the task manager (long press home, hit 'x' icon or swipe up).  When you reopen the app, make sure you have network access.
2) Make sure gmail is exposing the folder via IMAP.  Via the gmail web UI settings there's an IMAP thing.

If the label/folder is exposed and you did close and reopen the email app with network, then there's probably a bug that's causing syncFolderList to fail.  In that case we should be attempting to retrigger syncFolderList every time the app is opened.  Please close the app, start logging a logcat (described at https://wiki.mozilla.org/Gaia/Email/RequiredBugInfo), start the mail app, then attach the log here or email it to me privately.


This-bug-wise, the convoy refactor branch now triggers sync_folder_list every time the account is loaded at startup.  There's no once-a-day suppression.  This was done out of simplicity, but it also happens to be half of what comment 6 decided.
Flags: needinfo?(bugmail)
(In reply to Andrew Sutherland [:asuth] from comment #9)
> Things to check:
> 1) Make sure you closed the email app from the task manager (long press
> home, hit 'x' icon or swipe up).  When you reopen the app, make sure you
> have network access.

Andrew,

after I close the app from Task Manager the imap folders synced. I didn't knew the apps keeps in background even across reboots.

Thanks,

Andre
The email app won't survive a reboot on its own.  But maybe when you first opened it after a reboot a full 24-hours hadn't elapsed.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.