roundcube-thunderbird_labels icon indicating copy to clipboard operation
roundcube-thunderbird_labels copied to clipboard

Label custom names not working

Open Du-St opened this issue 5 years ago • 3 comments

Hi,

I am facing weird behavior when I am trying to set custom names of labels using RC Settings section and displaying them afterwards.

The input fields in the Settings section are empty by default. When I fill some values into and save them, the values are saved to a database, but input fields are empty again. And the label names presented in pop up menu or in the message detail are unchanged.

I created patch which fixes the problems (see attachment). May be I did not understand all ideas in the original code well.

Brief patch description:

  1. Line 98: condition for $c[3] causes always using default values, when is set. And it is always set, because during first run of the code, the $c is empty, so tb_label_custom_labels is saved to user profile (and causes setting of $c[3] for next run). May be I am missing something?
  2. Custom label names are saved to user profile having integer key (1 to 5), but default label names having string key (LABEL1 to LABEL5) which causes weird behavior when setting custom names and when displaying them (the string 'undefined' shows up instead of custom label name). thunderbird_labels-custom-label-names.zip

Du-St avatar Dec 07 '18 14:12 Du-St

yeah the code has many places where label1-5 are hardcoded. The settings section is a first step to allow arbritrary labels, but it's far from implemented correctly. If you want to help implement that you are welcome, please use the rc1.4beta branch as a starting point and with a merge request we can work together on it.

mike-kfed avatar Dec 10 '18 07:12 mike-kfed

  1. Thunderbird allows any number of label, not exactly five.
  2. I have custom labels: not $Label1, but $1:todo, $2:reply_awaiting that I set manually via user.js:
user_pref("mailnews.tags.$1:todo.tag", "ToDo");
user_pref("mailnews.tags.$1:todo.color", "#FF6666");

So this plugin doesn't work for me at all.

532910 avatar Nov 21 '19 21:11 532910

renaming the default 5 labels is a feature now.

using any IMAP labels doesn't work, because upstream roundcube mangles their names see roundcube/roundcubemail#4986

mike-kfed avatar Oct 12 '22 12:10 mike-kfed