Skip to content

Commit

Permalink
Merge pull request #26 from mysteriumnetwork/fix/upgrade-modal
Browse files Browse the repository at this point in the history
Force latest version check on upgrade modal open
  • Loading branch information
Zensey authored Apr 4, 2024
2 parents 26f751f + 2574a6f commit 29402db
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
5 changes: 5 additions & 0 deletions gobridge/gobridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ func GoTriggerUpgrade() {
ap.TriggerAction("upgrade")
}

//export GoTriggerCheck
func GoTriggerCheck() {
ap.TriggerAction("check")
}

//export GoSetState
func GoSetState(s *C.NSConfig) {

Expand Down
4 changes: 2 additions & 2 deletions launcher.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@
"$(PROJECT_DIR)/gobridge",
"$(PROJECT_DIR)",
);
MARKETING_VERSION = 1.0.45;
MARKETING_VERSION = 1.0.46;
PRODUCT_BUNDLE_IDENTIFIER = com.mysterium.launcher;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -606,7 +606,7 @@
"$(PROJECT_DIR)/gobridge",
"$(PROJECT_DIR)",
);
MARKETING_VERSION = 1.0.45;
MARKETING_VERSION = 1.0.46;
PRODUCT_BUNDLE_IDENTIFIER = com.mysterium.launcher;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
15 changes: 13 additions & 2 deletions launcher/UpgradeModalDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,28 @@ @implementation UpgradeModalDelegate
- (id)init
{
self = [super initWithWindowNibName:@"UpgradeModal"];
GoTriggerCheck();

// enable window delegate extension
[[self window] setDelegate:self];
[self autorelease];


[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(notificationHandlerState:) name:@"new_state" object:nil];

// init data
[self refreshFrame];
return self;
}

- (void) refreshFrame {
[self.lbImageName setStringValue:mod.imageName];
[self.lbVersionCurrent setStringValue:mod.currentVersion];
[self.lbVersionLatest setStringValue:mod.latestVersion];
[self.button setEnabled: [mod.hasUpdate boolValue]];
return self;
}

- (void)notificationHandlerState:(NSNotification *) notification{
[self refreshFrame];
}

- (void)notificationHandler:(NSNotification *) notification
Expand Down

0 comments on commit 29402db

Please sign in to comment.