Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grouped Folders: Sent #580

Merged
merged 3 commits into from
May 21, 2021
Merged

Grouped Folders: Sent #580

merged 3 commits into from
May 21, 2021

Conversation

marbetschar
Copy link
Member

@marbetschar marbetschar commented May 19, 2021

This PR re-adds the unified Sent folder. However, we do have two issues to solve with the current implementation:

  • Interestingly the items of the Sent folder do not seem to be loaded on application startup - this differs from INBOX and Archive
  • I still sometimes get a Segmentation fault on application start:
(gdb) backtrace
#0  0x00007f558862c434 in camel_message_info_get_date_received () at /lib/x86_64-linux-gnu/libcamel-1.2.so.62
#1  0x0000562d66f7e2ef in mail_conversation_item_model_get_newest_timestamp (node=0x7ffc405cc4c0, highest=1537724696)
    at ../src/ConversationList/ConversationItemModel.vala:168
#2  0x0000562d66f7e4a7 in mail_conversation_item_model_get_newest_timestamp (node=0x7ffc405cc620, highest=1537724696)
    at ../src/ConversationList/ConversationItemModel.vala:173
#3  0x0000562d66f7e4a7 in mail_conversation_item_model_get_newest_timestamp (node=0x7ffc405cc780, highest=1537724696)
    at ../src/ConversationList/ConversationItemModel.vala:173
#4  0x0000562d66f7e4a7 in mail_conversation_item_model_get_newest_timestamp (node=0x7ffc405cc8e0, highest=1537724696)
    at ../src/ConversationList/ConversationItemModel.vala:173
#5  0x0000562d66f7e4a7 in mail_conversation_item_model_get_newest_timestamp (node=0x7ffc405cc960, highest=-1)
    at ../src/ConversationList/ConversationItemModel.vala:173
#6  0x0000562d66f7f0d0 in mail_conversation_item_model_get_timestamp (self=0x562d68c03c10)
    at ../src/ConversationList/ConversationItemModel.vala:142
#7  0x0000562d66f82902 in mail_conversation_list_box_thread_sort_function (item1=0x562d68c03c10, item2=0x562d68f90550)
    at ../src/ConversationList/ConversationListBox.vala:253
#8  0x0000562d66f84be0 in _mail_conversation_list_box_thread_sort_function_gcompare_data_func
    (a=0x562d68c03c10, b=0x562d68f90550, self=0x0) at ConversationListBox.c:3163
#9  0x00007f55894764fc in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x00007f55894769df in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007f55894778b4 in g_sequence_insert_sorted_iter () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007f5589477998 in g_sequence_insert_sorted () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x0000562d66f87b5f in mail_conversation_list_store_add (self=0x562d678989e0, data=0x562d68f90550)
    at ../src/ConversationList/ConversationListStore.vala:81
#14 0x0000562d66f82835 in mail_conversation_list_box_add_conversation_item
    (self=0x562d678a4290, child=0x7ffc405ccdb0, service_uid=0x562d67c15950 "b22759c8bc5255fee4879df77529bb96dce6215b")
    at ../src/ConversationList/ConversationListBox.vala:249
#15 0x0000562d66f81d2c in mail_conversation_list_box_folder_changed
    (self=0x562d678a4290, change_info=0x562d68f8fef0, service_uid=0x562d67c15950 "b22759c8bc5255fee4879df77529bb96dce6215b", cancellable=0x562d67e2f660) at ../src/ConversationList/ConversationListBox.vala:205
#16 0x0000562d66f7fe33 in _____________lambda22_ (_data12_=0x562d676e3f00, change_info=0x562d68f8fef0)
    at ../src/ConversationList/ConversationListBox.vala:146
#17 0x0000562d66f7fe60 in ______________lambda22__camel_folder_changed
    (_sender=0x562d67832b30, changes=0x562d68f8fef0, self=0x562d676e3f00) at ../src/ConversationList/ConversationListBox.vala:146
#18 0x00007f55893be802 in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#19 0x00007f55893d2814 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#20 0x00007f55893ddbbe in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00007f55893de0f3 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#22 0x00007f558861390d in  () at /lib/x86_64-linux-gnu/libcamel-1.2.so.62
#23 0x00007f558945c04e in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007f558945c400 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007f558945c4a3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007f5588893fe5 in g_application_run () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#27 0x0000562d66f588e4 in _vala_main (args=0x7ffc405cd5e8, args_length1=1) at ../src/Application.vala:123
#28 0x0000562d66f5892b in main (argc=1, argv=0x7ffc405cd5e8) at ../src/Application.vala:121

@danirabbit
Copy link
Member

I'm not seeing any crashes, but I don't have anything in the "Sent" mailbox. I do have this terminal output:

** (io.elementary.mail:5538): CRITICAL **: 08:41:04.907: mail_grouped_folder_source_item_strip_folder_full_name: assertion 'folder_uri != NULL' failed

** (io.elementary.mail:5538): CRITICAL **: 08:41:04.911: mail_grouped_folder_source_item_strip_folder_full_name: assertion 'folder_uri != NULL' failed

(io.elementary.mail:5538): camel-WARNING **: 08:41:07.725: CamelIMAPXStore::get_folder_info_sync() reported failure without setting its GError

Interestingly, for my two GMail accounts, there is no toplevel "Sent" folder. GMail seems to structure its inboxes a little strangely. So this might be a product of the "Sent" folder not being detected in the first place:

Screenshot from 2021-05-19 08 44 32

@hanaral
Copy link

hanaral commented May 19, 2021

I'm not seeing any crashes, but I don't have anything in the "Sent" mailbox. I do have this terminal output:

** (io.elementary.mail:5538): CRITICAL **: 08:41:04.907: mail_grouped_folder_source_item_strip_folder_full_name: assertion 'folder_uri != NULL' failed

** (io.elementary.mail:5538): CRITICAL **: 08:41:04.911: mail_grouped_folder_source_item_strip_folder_full_name: assertion 'folder_uri != NULL' failed

(io.elementary.mail:5538): camel-WARNING **: 08:41:07.725: CamelIMAPXStore::get_folder_info_sync() reported failure without setting its GError

Interestingly, for my two GMail accounts, there is no toplevel "Sent" folder. GMail seems to structure its inboxes a little strangely. So this might be a product of the "Sent" folder not being detected in the first place:

Couldn't some smart detection be used here too? It's the same for my gmail too.
Also @danrabbit ur mail is visible

@marbetschar
Copy link
Member Author

@danrabbit yeah, Google does things differently for whatever reason and the Sent folder is not detected at all. Will fix the corresponding criticals/warnings.

@hanaral the folder detection logic should be the same like we have in Evolution. If the folder does not get the appropriate icon in Evolution itself, is very likely the needed information is not exposed via EDS either (which seems to be the case for the Sent folder in a Google account).

Here's a Screenshot of my Google account in Evolution - as you can see Sent ("Gesendet") does not have any custom icon:

Screenshot from 2021-05-21 09-14-40

@marbetschar
Copy link
Member Author

@danrabbit fixing the folder-is-not-available case also solved the messages not loading at application startup. However, I still sometimes encounter an application crash. But it is caused by an underlying concurrency issue and is not directly related to this PR. Therefore I will open a dedicated issue for it and this PR is ready for review.

@marbetschar marbetschar marked this pull request as ready for review May 21, 2021 08:39
@marbetschar marbetschar requested a review from a team May 21, 2021 08:40
@marbetschar
Copy link
Member Author

marbetschar commented May 21, 2021

See #581 for more information about the app crash.

Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'm gonna assume that this probably works for non-gmail folks. I'm at least not getting the same errors so let's go :)

@danirabbit danirabbit merged commit d00c853 into master May 21, 2021
@danirabbit danirabbit deleted the grouped-folder-sent branch May 21, 2021 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants