Skip to content

Commit

Permalink
Release v0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
revilon1991 committed Jan 23, 2022
1 parent 5429a8e commit 5f0013c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
14 changes: 6 additions & 8 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 5f0013c

Please sign in to comment.