diff --git a/CHANGELOG.md b/CHANGELOG.md index 30b5b9a..b2249a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 5.2.0-4 (2019/07/24) + +* Add option to disable delay (Issue #2) + ## 5.2.0-3 (2019/07/21) * Franz 5.2.0 diff --git a/build.properties b/build.properties index c4aeaaf..8ca1a24 100644 --- a/build.properties +++ b/build.properties @@ -34,6 +34,9 @@ electron.appasar3.replace = field: form.$('autoLaunchOnStart'), disabled: true electron.appasar4.file = containers/settings/EditSettingsScreen.js electron.appasar4.search = value: app.autoLaunchOnStart electron.appasar4.replace = value: false +electron.appasar5.file = features/delayApp/index.js +electron.appasar5.search = if (isEnabled) { +electron.appasar5.replace = if (isEnabled && process.env.FRANZ_DELAY == "true") { # Official artifacts atf.id = franz diff --git a/build.xml b/build.xml index e5cc9ba..8ca5e26 100644 --- a/build.xml +++ b/build.xml @@ -66,6 +66,10 @@ + + + + diff --git a/main.go b/main.go index 858ae62..0c1c0cb 100644 --- a/main.go +++ b/main.go @@ -16,15 +16,25 @@ import ( "github.com/portapps/portapps/pkg/utl" ) +type config struct { + DisableDelay bool `yaml:"disable_delay" mapstructure:"disable_delay"` +} + var ( app *App + cfg *config ) func init() { var err error + // Default config + cfg = &config{ + DisableDelay: false, + } + // Init app - if app, err = New("franz-portable", "Franz"); err != nil { + if app, err = NewWithCfg("franz-portable", "Franz", cfg); err != nil { Log.Fatal().Err(err).Msg("Cannot initialize application. See log file for more info.") } } @@ -44,6 +54,13 @@ func main() { Log.Error().Err(err).Msg("Cannot write default shortcut") } + // Check delay + if cfg.DisableDelay { + utl.OverrideEnv("FRANZ_DELAY", "false") + } else { + utl.OverrideEnv("FRANZ_DELAY", "true") + } + // Update default shortcut err = shortcut.Create(shortcut.Shortcut{ ShortcutPath: shortcutPath,