Fix showing error msg

This commit is contained in:
Michal Horejsek
2020-08-21 10:01:45 +02:00
parent 40aeb6c010
commit 8592a264c0
3 changed files with 12 additions and 5 deletions

View File

@ -137,8 +137,9 @@ Item {
}
onNotifyError : {
var name = go.errorDescription.slice(0, go.errorDescription.indexOf("\n"))
var errorMessage = go.errorDescription.slice(go.errorDescription.indexOf("\n"))
var sep = go.errorDescription.indexOf("\n") < 0 ? go.errorDescription.length : go.errorDescription.indexOf("\n")
var name = go.errorDescription.slice(0, sep)
var errorMessage = go.errorDescription.slice(sep)
switch (errCode) {
case gui.enums.errPMLoadFailed :
winMain.popupMessage.show ( qsTr ( "Loading ProtonMail folders and labels was not successful." , "Error message" ) )

View File

@ -474,6 +474,7 @@ func (f *FrontendQt) createLabelOrFolder(email, name, color string, isLabel bool
m, err := f.transfer.CreateTargetMailbox(m)
if err != nil {
log.Errorln("Folder/Label creating:", err)
err = errors.New(name + "\n" + err.Error()) // GUI splits by \n.
if isLabel {
f.showError(errCreateLabelFailed, err)
} else {

View File

@ -15,12 +15,17 @@
// You should have received a copy of the GNU General Public License
// along with ProtonMail Bridge. If not, see <https://www.gnu.org/licenses/>.
// Code generated by ./release-notes.sh at 'Thu Aug 20 14:25:06 CEST 2020'. DO NOT EDIT.
// Code generated by ./release-notes.sh at 'Fri Aug 21 09:35:33 CEST 2020'. DO NOT EDIT.
package importexport
const ReleaseNotes = `
const ReleaseNotes = `• Complete code refactor in preparation of live release and open source of the Import-Export app
• Increased number of supported mail providers by changing the way the folder structures are handled (NIL hierarchy delimiter)
• Improved handling for unstable internet and pause & resume behavior
`
const ReleaseFixedBugs = `
const ReleaseFixedBugs = `• Fixed rare cases where the application freezes when starting/stopping imports
• Allowed current date to be included in the selected date range for both import and export
• Improved manual update process
• Limit space usage by on device application logs
`