From 5f0013cc33dd3b5bc1d7ca7d1df66a3ae6afe58b Mon Sep 17 00:00:00 2001 From: ekuznestov Date: Sun, 23 Jan 2022 18:29:45 +0200 Subject: [PATCH] Release v0.1.1 --- CHANGELOG.md | 6 ++++++ cmd/main.go | 14 ++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5669f51..7eef096 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ ## [Unreleased] +## [0.1.1] - 2022-01-23 +### Added +- There is a push notification if you didn't configure the SFTP connection. +### Fixed +- Application crashes when any text field is focused. This was noticed on the macOS `12.1` version. + ## [0.1.0] - 2021-08-22 ### Added - Database SQLite for storing user config. diff --git a/cmd/main.go b/cmd/main.go index ab74f5b..306bb52 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -31,8 +31,6 @@ type Screenshot struct { createdAt string } -const BundleId = "com.revilon1991.screenshot" - var screenshotChan = make(chan Screenshot) var screenshotPull = make(map[string]Screenshot) var Version = "0" @@ -228,12 +226,6 @@ func ui() { menu.AddItem(itemPreferences) menu.AddItem(itemQuit) obj.SetMenu(menu) - - NSBundle := cocoa.NSBundle_Main().Class() - NSBundle.AddMethod("__bundleIdentifier", func(_ objc.Object) objc.Object { - return core.String(BundleId) - }) - NSBundle.Swizzle("bundleIdentifier", "__bundleIdentifier") } //export queryWire @@ -276,6 +268,12 @@ func listener() { userConfig := getUserConfig() + if userConfig == nil { + sendNotify("Connection config is empty", "Open Preferences and configure sftp connect") + + continue + } + fileLink, err := sendFile(userConfig, screenshot.path) if err != nil {