forked from Silverfish/proton-bridge
fix: better first start setting
This commit is contained in:
@ -29,8 +29,7 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
|
|||||||
* github.com/urfave/cli v1.22.3 -> v1.22.4
|
* github.com/urfave/cli v1.22.3 -> v1.22.4
|
||||||
* golang.org/x/net 20200301022130-244492dfa37a -> 20200707034311-ab3426394381
|
* golang.org/x/net 20200301022130-244492dfa37a -> 20200707034311-ab3426394381
|
||||||
* golang.org/x/text v0.3.2 -> v0.3.3
|
* golang.org/x/text v0.3.2 -> v0.3.3
|
||||||
|
* Set first-start to false in bridge, not in frontend.
|
||||||
|
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
* GODT-454 Fix send on closed channel when receiving unencrypted send confirmation from GUI.
|
* GODT-454 Fix send on closed channel when receiving unencrypted send confirmation from GUI.
|
||||||
|
|||||||
@ -70,6 +70,7 @@ func New(
|
|||||||
|
|
||||||
if pref.GetBool(preferences.FirstStartKey) {
|
if pref.GetBool(preferences.FirstStartKey) {
|
||||||
b.SendMetric(metrics.New(metrics.Setup, metrics.FirstStart, metrics.Label(config.GetVersion())))
|
b.SendMetric(metrics.New(metrics.Setup, metrics.FirstStart, metrics.Label(config.GetVersion())))
|
||||||
|
pref.SetBool(preferences.FirstStartKey, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
go b.heartbeat()
|
go b.heartbeat()
|
||||||
|
|||||||
@ -32,6 +32,7 @@ type StoreFactoryConfiger interface {
|
|||||||
type PreferenceProvider interface {
|
type PreferenceProvider interface {
|
||||||
Get(key string) string
|
Get(key string) string
|
||||||
GetBool(key string) bool
|
GetBool(key string) bool
|
||||||
|
SetBool(key string, val bool)
|
||||||
GetInt(key string) int
|
GetInt(key string) int
|
||||||
Set(key string, value string)
|
Set(key string, value string)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,7 +21,6 @@ package cli
|
|||||||
import (
|
import (
|
||||||
"github.com/ProtonMail/proton-bridge/internal/events"
|
"github.com/ProtonMail/proton-bridge/internal/events"
|
||||||
"github.com/ProtonMail/proton-bridge/internal/frontend/types"
|
"github.com/ProtonMail/proton-bridge/internal/frontend/types"
|
||||||
"github.com/ProtonMail/proton-bridge/internal/preferences"
|
|
||||||
"github.com/ProtonMail/proton-bridge/pkg/config"
|
"github.com/ProtonMail/proton-bridge/pkg/config"
|
||||||
"github.com/ProtonMail/proton-bridge/pkg/listener"
|
"github.com/ProtonMail/proton-bridge/pkg/listener"
|
||||||
|
|
||||||
@ -241,8 +240,6 @@ func (f *frontendCLI) Loop(credentialsError error) error {
|
|||||||
return credentialsError
|
return credentialsError
|
||||||
}
|
}
|
||||||
|
|
||||||
f.preferences.SetBool(preferences.FirstStartKey, false)
|
|
||||||
|
|
||||||
f.Print(`
|
f.Print(`
|
||||||
Welcome to ProtonMail Bridge interactive shell
|
Welcome to ProtonMail Bridge interactive shell
|
||||||
___....___
|
___....___
|
||||||
|
|||||||
@ -317,8 +317,6 @@ func (s *FrontendQt) qtExecute(Procedure func(*FrontendQt) error) error {
|
|||||||
|
|
||||||
// Set first start flag.
|
// Set first start flag.
|
||||||
s.Qml.SetIsFirstStart(s.preferences.GetBool(preferences.FirstStartKey))
|
s.Qml.SetIsFirstStart(s.preferences.GetBool(preferences.FirstStartKey))
|
||||||
// Don't repeat next start.
|
|
||||||
s.preferences.SetBool(preferences.FirstStartKey, false)
|
|
||||||
|
|
||||||
// Check if it is first start after update (fresh version).
|
// Check if it is first start after update (fresh version).
|
||||||
lastVersion := s.preferences.Get(preferences.LastVersionKey)
|
lastVersion := s.preferences.Get(preferences.LastVersionKey)
|
||||||
|
|||||||
Reference in New Issue
Block a user