GODT-1366: Simple lookup of index and select current user

This commit is contained in:
Jakub
2021-11-05 12:31:32 +01:00
parent 9984165798
commit 961742fa53
13 changed files with 106 additions and 17 deletions

View File

@ -23,6 +23,7 @@ package qt
import (
"sync"
"github.com/ProtonMail/proton-bridge/internal/events"
"github.com/ProtonMail/proton-bridge/internal/frontend/types"
"github.com/therecipe/qt/core"
)
@ -174,6 +175,8 @@ func (um *QMLUserModel) load() {
}
func (um *QMLUserModel) userChanged(userID string) {
defer um.f.eventListener.Emit(events.UserChangeDone, userID)
index := um.indexByIDNotSafe(userID)
user, err := um.f.bridge.GetUser(userID)