Rename 'Folders' to currently selected account
2 Attachment(s)
Hi all, within the Jolla email application, we find a page named Folders, showing inbox/outbox/etc.
I manage multiple accounts (mostly on my PC) but also find it handy to be able to monitor all accounts from my Jolla1. I have made several unsuccessful attempts to edit 'FoldersListPage.qml' to reflect the desired changes, at worst, the folders page becomes inaccessible. I thought that by using a line of code** from AccountList.qml (line 90) and inserting into the header title of FoldersListPage.qml (line 38) that I would then see the display name/email address of the account, but it didn't work, I get an error from console; Code:
** title: displayName != "" ? displayName : emailAddress Code:
[W] unknown:38 - file:///usr/share/jolla-email//pages/FolderListPage.qml:38: However, the above is just one example of many different attempts Any ideas appreciated as I am out of ideas, if i cannot crack it myself, I'll possibly post as a feature request on TJC. Regards, Before edit......then after |
Re: Rename 'Folders' to currently selected account
Not tested, but you can try:
title: mailAccountListModel.displayNameFromAccountId(acco untKey) The email address for the accountid can be retrieved the same way with: mailAccountListModel.emailAddressFromAccountId(acc ountKey) |
Re: Rename 'Folders' to currently selected account
Thanks @dcaliste, your code is spot on, bang on the money!
Regards, p.s. I'm curious as to how you arrived at that particular code?, is this something you basically already knew? |
Re: Rename 'Folders' to currently selected account
Happy that it's working. Besides, it's not a bad suggestion, I would say. What do you think about posting a feature request on TJC ? I would like to hear the opinion of other people about this proposition.
If enough people approve, I'll submit a patch to Jolla and try to advocate for the change. About how I find this, I've access to the email code through NDA. But it is in clear in QML anyway. The solution is based also on nemo-qml-plugin-email (see src/emailAccountListModel.h) which is Open Source and in the SailfishOS git repository. To fully answer your question, the code you try to paste is from a delegate. So the displayName is an attribute of the model at a given index. It cannot be accessed out of the delegate. But nemo-qml-plugin-email provides accessors to the display name and some other attributes directly from the account id. The mailAccountListModel object I'm using, can be found in the email.qml file. It is a global object that is available in all the app. |
Re: Rename 'Folders' to currently selected account
Quote:
I'm glad you like the idea, at your suggestion I will certainly post on TJC, it's always nice when Jolla gives the nod and includes end users ideas into the OS/apps. Thanks again,... |
Re: Rename 'Folders' to currently selected account
|
Re: Rename 'Folders' to currently selected account
Quote:
|
All times are GMT. The time now is 05:27. |
vBulletin® Version 3.8.8