Skip to content

Commit 0d50b70

Browse files
Prot10claude
andcommitted
release: v0.1.7
Fixed update button visibility with polling mechanism Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 4fcae81 commit 0d50b70

5 files changed

Lines changed: 89 additions & 18 deletions

File tree

MyMacCleaner.xcodeproj/project.pbxproj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@
419419
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
420420
CODE_SIGN_STYLE = Manual;
421421
COMBINE_HIDPI_IMAGES = YES;
422-
CURRENT_PROJECT_VERSION = 7;
422+
CURRENT_PROJECT_VERSION = 8;
423423
DEVELOPMENT_TEAM = "";
424424
"DEVELOPMENT_TEAM[sdk=macosx*]" = 7K4SKUHU47;
425425
ENABLE_HARDENED_RUNTIME = YES;
@@ -439,7 +439,7 @@
439439
"$(inherited)",
440440
"@executable_path/../Frameworks",
441441
);
442-
MARKETING_VERSION = 0.1.6;
442+
MARKETING_VERSION = 0.1.7;
443443
PRODUCT_BUNDLE_IDENTIFIER = com.mymaccleaner.MyMacCleaner;
444444
PRODUCT_NAME = "$(TARGET_NAME)";
445445
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -465,7 +465,7 @@
465465
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
466466
CODE_SIGN_STYLE = Manual;
467467
COMBINE_HIDPI_IMAGES = YES;
468-
CURRENT_PROJECT_VERSION = 7;
468+
CURRENT_PROJECT_VERSION = 8;
469469
DEVELOPMENT_TEAM = "";
470470
"DEVELOPMENT_TEAM[sdk=macosx*]" = 7K4SKUHU47;
471471
ENABLE_HARDENED_RUNTIME = YES;
@@ -485,7 +485,7 @@
485485
"$(inherited)",
486486
"@executable_path/../Frameworks",
487487
);
488-
MARKETING_VERSION = 0.1.6;
488+
MARKETING_VERSION = 0.1.7;
489489
PRODUCT_BUNDLE_IDENTIFIER = com.mymaccleaner.MyMacCleaner;
490490
PRODUCT_NAME = "$(TARGET_NAME)";
491491
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -506,10 +506,10 @@
506506
buildSettings = {
507507
BUNDLE_LOADER = "$(TEST_HOST)";
508508
CODE_SIGN_STYLE = Automatic;
509-
CURRENT_PROJECT_VERSION = 7;
509+
CURRENT_PROJECT_VERSION = 8;
510510
GENERATE_INFOPLIST_FILE = YES;
511511
MACOSX_DEPLOYMENT_TARGET = 14.0;
512-
MARKETING_VERSION = 0.1.6;
512+
MARKETING_VERSION = 0.1.7;
513513
PRODUCT_BUNDLE_IDENTIFIER = com.mymaccleaner.MyMacCleanerTests;
514514
PRODUCT_NAME = "$(TARGET_NAME)";
515515
SWIFT_EMIT_LOC_STRINGS = NO;
@@ -523,10 +523,10 @@
523523
buildSettings = {
524524
BUNDLE_LOADER = "$(TEST_HOST)";
525525
CODE_SIGN_STYLE = Automatic;
526-
CURRENT_PROJECT_VERSION = 7;
526+
CURRENT_PROJECT_VERSION = 8;
527527
GENERATE_INFOPLIST_FILE = YES;
528528
MACOSX_DEPLOYMENT_TARGET = 14.0;
529-
MARKETING_VERSION = 0.1.6;
529+
MARKETING_VERSION = 0.1.7;
530530
PRODUCT_BUNDLE_IDENTIFIER = com.mymaccleaner.MyMacCleanerTests;
531531
PRODUCT_NAME = "$(TARGET_NAME)";
532532
SWIFT_EMIT_LOC_STRINGS = NO;
@@ -539,9 +539,9 @@
539539
isa = XCBuildConfiguration;
540540
buildSettings = {
541541
CODE_SIGN_STYLE = Automatic;
542-
CURRENT_PROJECT_VERSION = 7;
542+
CURRENT_PROJECT_VERSION = 8;
543543
GENERATE_INFOPLIST_FILE = YES;
544-
MARKETING_VERSION = 0.1.6;
544+
MARKETING_VERSION = 0.1.7;
545545
PRODUCT_BUNDLE_IDENTIFIER = com.mymaccleaner.MyMacCleanerUITests;
546546
PRODUCT_NAME = "$(TARGET_NAME)";
547547
SWIFT_EMIT_LOC_STRINGS = NO;
@@ -554,9 +554,9 @@
554554
isa = XCBuildConfiguration;
555555
buildSettings = {
556556
CODE_SIGN_STYLE = Automatic;
557-
CURRENT_PROJECT_VERSION = 7;
557+
CURRENT_PROJECT_VERSION = 8;
558558
GENERATE_INFOPLIST_FILE = YES;
559-
MARKETING_VERSION = 0.1.6;
559+
MARKETING_VERSION = 0.1.7;
560560
PRODUCT_BUNDLE_IDENTIFIER = com.mymaccleaner.MyMacCleanerUITests;
561561
PRODUCT_NAME = "$(TARGET_NAME)";
562562
SWIFT_EMIT_LOC_STRINGS = NO;

MyMacCleaner/App/ContentView.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -306,12 +306,9 @@ struct DetailContentView: View {
306306
ToolbarItem(placement: .automatic) {
307307
Spacer()
308308
}
309-
// Update available button (always present, visibility controlled by opacity)
309+
// Update available button - uses wrapper that handles visibility
310310
ToolbarItem(placement: .automatic) {
311-
UpdateAvailableButton()
312-
.opacity(updateManager.updateAvailable ? 1 : 0)
313-
.frame(width: updateManager.updateAvailable ? nil : 0)
314-
.disabled(!updateManager.updateAvailable)
311+
UpdateToolbarItem()
315312
}
316313
ToolbarItem(placement: .automatic) {
317314
LanguageSwitcherButton()

MyMacCleaner/Core/Design/UpdateAvailableButton.swift

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,44 @@
11
import SwiftUI
22

3+
// MARK: - Update Available Toolbar Item
4+
// This wrapper handles conditional visibility in the toolbar
5+
6+
struct UpdateToolbarItem: View {
7+
@Environment(UpdateManager.self) var updateManager
8+
@State private var showButton = false
9+
10+
var body: some View {
11+
Group {
12+
if showButton {
13+
UpdateAvailableButton()
14+
}
15+
}
16+
.onAppear {
17+
// Check immediately
18+
showButton = updateManager.updateAvailable
19+
20+
// Also poll periodically in case the state changes
21+
Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { timer in
22+
let shouldShow = updateManager.updateAvailable
23+
if shouldShow != showButton {
24+
withAnimation {
25+
showButton = shouldShow
26+
}
27+
}
28+
// Stop polling once we find an update
29+
if shouldShow {
30+
timer.invalidate()
31+
}
32+
}
33+
}
34+
.onChange(of: updateManager.updateAvailable) { _, newValue in
35+
withAnimation {
36+
showButton = newValue
37+
}
38+
}
39+
}
40+
}
41+
342
// MARK: - Update Available Button
443

544
struct UpdateAvailableButton: View {

appcast.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@
66
<description>Most recent changes with links to updates.</description>
77
<language>en</language>
88

9+
<item>
10+
<title>Version 0.1.7</title>
11+
<pubDate>Fri, 23 Jan 2026 12:31:32 +0100</pubDate>
12+
<sparkle:version>8</sparkle:version>
13+
<sparkle:shortVersionString>0.1.7</sparkle:shortVersionString>
14+
<sparkle:minimumSystemVersion>14.0</sparkle:minimumSystemVersion>
15+
<description><![CDATA[
16+
<h2>What's New in Version 0.1.7</h2>
17+
<ul>
18+
<li>Fixed update button visibility with polling mechanism</li>
19+
</ul>
20+
]]></description>
21+
<enclosure url="https://github.com/Prot10/MyMacCleaner/releases/download/v0.1.7/MyMacCleaner-v0.1.7.zip" sparkle:edSignature="iLb+Cjg57u1f6/6U/UZ9TTWi5WmEzIestKfJJGBpRFJGzFGbkk3I0hWQdG/A3QaJaXRep/DV56fSpSDIBpiEBQ==" length="4445349" type="application/octet-stream"/>
22+
</item>
23+
24+
925
<item>
1026
<title>Version 0.1.6</title>
1127
<pubDate>Fri, 23 Jan 2026 12:21:54 +0100</pubDate>

website/public/data/releases.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
11
{
22
"releases": [
33
{
4-
"version": "0.1.6",
4+
"version": "0.1.7",
55
"date": "2026-01-23",
66
"latest": true,
77
"minOS": "macOS 14.0+",
88
"architecture": "Universal (Apple Silicon + Intel)",
9+
"downloads": {
10+
"dmg": {
11+
"url": "https://github.com/Prot10/MyMacCleaner/releases/download/v0.1.7/MyMacCleaner-v0.1.7.dmg",
12+
"size": "4.6 MB"
13+
}
14+
},
15+
"changelog": [
16+
{
17+
"type": "fixed",
18+
"description": "Fixed update button visibility with polling mechanism"
19+
}
20+
]
21+
},
22+
{
23+
"version": "0.1.6",
24+
"date": "2026-01-23",
25+
"latest": false,
26+
"minOS": "macOS 14.0+",
27+
"architecture": "Universal (Apple Silicon + Intel)",
928
"downloads": {
1029
"dmg": {
1130
"url": "https://github.com/Prot10/MyMacCleaner/releases/download/v0.1.6/MyMacCleaner-v0.1.6.dmg",

0 commit comments

Comments
 (0)