Skip to content

Commit 94da9af

Browse files
committed
Fixes
1 parent 2dadeeb commit 94da9af

17 files changed

Lines changed: 165 additions & 147 deletions

File tree

TestFlight/WhatToTest.en-US.txt

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,4 @@
1-
HUGE UPDATE! But I'm too tired to write a full changelog.
2-
3-
-----
4-
IMPORTANT 1: THIS IS THE FIRST BUILD OF THE NEW THEMES SYSTEM. EXPECT BUGS/CRASHES AND PLEASE REPORT THEM IN THE DISCORD CHANNEL (if you feel like doing so)
5-
-----
6-
7-
- Themes: fantastic new option for you to customize everything in the app. It's a WIP, but it's already very good!
8-
- Great performance improvements
9-
- Crashes fixes
10-
- Subreddits filter
11-
- Many other stuff you may find around, good exploring.
12-
13-
--- QUICK EXTRA UPDATE ---
14-
- Fixed alphaber jumper wrong background
15-
- Added comment body text customization
16-
- Fixed crash on export themes
17-
- Added media corner radius to post links
18-
- Added foreground color for all lists in the app
19-
- IN APP BROWSER \o/ (for post links)
20-
1+
- Fixes posts not loading when opened externally
2+
- Performance improvements
3+
- Added color setting for indentation lines
4+
- Fixes inbox links not clickable

winston.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
EC6CBE352A7D6E760089EAA0 /* LICENSE.md in Sources */ = {isa = PBXBuildFile; fileRef = EC6CBE342A7D6E760089EAA0 /* LICENSE.md */; };
150150
EC77B1832AA4021D00C482DF /* DefaultDestinationInjector.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC77B1822AA4021D00C482DF /* DefaultDestinationInjector.swift */; };
151151
EC77B1852AA434DD00C482DF /* stringToAttr.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC77B1842AA434DD00C482DF /* stringToAttr.swift */; };
152+
EC7933742ABACF9E0094B6F1 /* ifIOS17.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC7933732ABACF9E0094B6F1 /* ifIOS17.swift */; };
152153
EC7DBDEF2A846D0C00D7C123 /* save.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC7DBDEE2A846D0C00D7C123 /* save.swift */; };
153154
EC7DBDF12A86C91A00D7C123 /* CommentSwipePanel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC7DBDF02A86C91A00D7C123 /* CommentSwipePanel.swift */; };
154155
EC7DBDF32A86C92200D7C123 /* PostSwipePanel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC7DBDF22A86C92200D7C123 /* PostSwipePanel.swift */; };
@@ -479,6 +480,7 @@
479480
EC6CBE342A7D6E760089EAA0 /* LICENSE.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = LICENSE.md; sourceTree = "<group>"; };
480481
EC77B1822AA4021D00C482DF /* DefaultDestinationInjector.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultDestinationInjector.swift; sourceTree = "<group>"; };
481482
EC77B1842AA434DD00C482DF /* stringToAttr.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = stringToAttr.swift; sourceTree = "<group>"; };
483+
EC7933732ABACF9E0094B6F1 /* ifIOS17.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ifIOS17.swift; sourceTree = "<group>"; };
482484
EC7DBDEE2A846D0C00D7C123 /* save.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = save.swift; sourceTree = "<group>"; };
483485
EC7DBDF02A86C91A00D7C123 /* CommentSwipePanel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommentSwipePanel.swift; sourceTree = "<group>"; };
484486
EC7DBDF22A86C92200D7C123 /* PostSwipePanel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostSwipePanel.swift; sourceTree = "<group>"; };
@@ -783,6 +785,7 @@
783785
EC3AC9E82AB317CB0078EC78 /* subtleSheet.swift */,
784786
EC46E9292ABA4340001BC068 /* themedListRowBG.swift */,
785787
EC46E92B2ABA4460001BC068 /* themedListDividers.swift */,
788+
EC7933732ABACF9E0094B6F1 /* ifIOS17.swift */,
786789
);
787790
path = modifiers;
788791
sourceTree = "<group>";
@@ -1592,6 +1595,7 @@
15921595
EC92FBDE2A589BE200391D1D /* SquircleUIKit.swift in Sources */,
15931596
ECAA8B602A75216E00D9D636 /* ShortPostLink.swift in Sources */,
15941597
ECE08B5B2AA9C43B00F84DC9 /* saveAndLoadImages.swift in Sources */,
1598+
EC7933742ABACF9E0094B6F1 /* ifIOS17.swift in Sources */,
15951599
EC5EDA732A4E8EC400140A08 /* fetchSub.swift in Sources */,
15961600
EC46E9282ABA3B05001BC068 /* WNavigationLink.swift in Sources */,
15971601
EC08543F2A4D0C0700E88389 /* doThisAfter.swift in Sources */,

winston/components/Links/CommentLink/Arrows.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,23 @@ struct Arrows: View {
3434
var kind: ArrowKind
3535
var offset: CGFloat = 0
3636
@Environment(\.useTheme) private var selectedTheme
37+
@Environment(\.colorScheme) private var cs
3738
var body: some View {
3839
let curve = selectedTheme.comments.theme.indentCurve
40+
let curveColor = selectedTheme.comments.theme.indentColor
3941
let avatarSize = selectedTheme.comments.theme.badge.avatar.size
4042
Group {
4143
switch kind {
4244
case .curve:
4345
CurveShape(offset: offset, curve: curve, avatarSize: avatarSize)
44-
.stroke(Color("divider"), style: StrokeStyle(lineWidth: 2, lineCap: .round))
46+
.stroke(curveColor.cs(cs).color(), style: StrokeStyle(lineWidth: 2, lineCap: .round))
4547
case .straight:
4648
StraightShape()
47-
.stroke(Color("divider"), style: StrokeStyle(lineWidth: 2, lineCap: .round))
49+
.stroke(curveColor.cs(cs).color(), style: StrokeStyle(lineWidth: 2, lineCap: .round))
4850
.padding(.vertical, -1)
4951
case .straightCurve:
5052
StraightCurveShape(offset: offset, curve: curve, avatarSize: avatarSize)
51-
.stroke(Color("divider"), style: StrokeStyle(lineWidth: 2, lineCap: .round))
53+
.stroke(curveColor.cs(cs).color(), style: StrokeStyle(lineWidth: 2, lineCap: .round))
5254
.padding(.vertical, -1)
5355
case .empty:
5456
Color.clear

winston/components/Links/CommentLink/CommentLinkFull.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ struct CommentLinkFull: View {
2222
@Environment(\.colorScheme) private var cs
2323

2424
var body: some View {
25+
let curveColor = selectedTheme.comments.theme.indentColor.cs(cs).color()
2526
let cardedCommentsInnerHPadding = selectedTheme.comments.theme.innerPadding.horizontal
2627
let preferenceShowCommentsCards = selectedTheme.comments.theme.type == .card
2728
let horPad = preferenceShowCommentsCards ? cardedCommentsInnerHPadding : 0
@@ -52,7 +53,7 @@ struct CommentLinkFull: View {
5253
}
5354
.padding(.horizontal, horPad)
5455
.frame(maxWidth: .infinity, alignment: .leading)
55-
.background(selectedTheme.comments.theme.bg.cs(cs).color())
56+
.background(curveColor)
5657
.contentShape(Rectangle())
5758
.onTapGesture {
5859
routerProxy.router.path.append(PostViewPayload(post: post, postSelfAttr: attrStrLoader.data, sub: subreddit))

winston/components/Links/CommentLink/CommentLinkMore.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ struct CommentLinkMore: View {
2020
@Environment(\.colorScheme) private var cs
2121

2222
var body: some View {
23+
let curveColor = selectedTheme.comments.theme.indentColor.cs(cs).color()
2324
let preferenceShowCommentsCards = selectedTheme.comments.theme.type == .card
2425
let cardedCommentsInnerHPadding = selectedTheme.comments.theme.innerPadding.horizontal
2526
let horPad = preferenceShowCommentsCards ? cardedCommentsInnerHPadding : 0
@@ -59,7 +60,7 @@ struct CommentLinkMore: View {
5960
.padding(.vertical, 8)
6061
.padding(.horizontal, 12)
6162
.opacity(loadMoreLoading ? 0.5 : 1)
62-
.background(Capsule(style: .continuous).fill(Color("divider")))
63+
.background(Capsule(style: .continuous).fill(curveColor))
6364
.padding(.vertical, 4)
6465
.compositingGroup()
6566
.fontSize(selectedTheme.comments.theme.bodyText.size, .medium)

winston/components/Links/MessageLink.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ struct MessageLink: View {
2929
Text((data.body ?? "").md()).lineLimit(2).fontSize(15).opacity(0.75)
3030
}
3131
}
32-
.allowsHitTesting(false)
3332
.padding(.horizontal, 16)
3433
.padding(.vertical, 12)
3534
.frame(maxWidth: .infinity, alignment: .topLeading)
3635
.themedListRowBG()
3736
.mask(RR(20, .black))
37+
.allowsHitTesting(false)
3838
.compositingGroup()
3939
.opacity(!(data.new ?? false) ? 0.65 : 1)
4040
.swipyActions(pressing: $pressed, onTap: {

winston/globals/defaultFlatTheme.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ let defaultFlatTheme = WinstonTheme(
2121
icon: "paintbrush.fill",
2222
author: "lo.cafe"
2323
),
24-
id: "default",
24+
id: "default-flat",
2525
postLinks: .init(
2626
theme: .init(
2727
type: .card,
@@ -57,6 +57,7 @@ let defaultFlatTheme = WinstonTheme(
5757
outerHPadding: 8,
5858
repliesSpacing: 0,
5959
indentCurve: 12,
60+
indentColor: dividerColor,
6061
cornerRadius: 10,
6162
badge: badgeTheme,
6263
bodyText: .init(size: 15, color: primary),

winston/globals/defaultTheme.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ let defaultTheme = WinstonTheme(
6868
outerHPadding: 8,
6969
repliesSpacing: 0,
7070
indentCurve: 12,
71+
indentColor: dividerColor,
7172
cornerRadius: 10,
7273
badge: badgeTheme,
7374
bodyText: .init(size: 15, color: primary),

winston/models/RedditAPI/post/hidePost.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@ private class HideDebouncer {
1818

1919
extension RedditAPI {
2020
func hidePost(_ hide: Bool, fullnames: [String]) async -> () {
21-
if !HideDebouncer.shared.workItem.isNil {
22-
HideDebouncer.shared.workItem?.cancel()
23-
HideDebouncer.shared.workItem = nil
24-
}
2521
HideDebouncer.shared.names += fullnames
22+
if !HideDebouncer.shared.workItem.isNil { return }
23+
print("kmkm")
2624
HideDebouncer.shared.workItem = DispatchWorkItem {
2725
HideDebouncer.shared.workItem = nil
2826
let names = HideDebouncer.shared.names
27+
print("kmkm", names)
2928
HideDebouncer.shared.names.removeAll()
3029
Task(priority: .background) {
3130
await self.refreshToken()
@@ -55,7 +54,7 @@ extension RedditAPI {
5554
}
5655
}
5756
if let workItem = HideDebouncer.shared.workItem {
58-
DispatchQueue.main.asyncAfter(deadline: .now() + 1, execute: workItem) // delay of 5 seconds
57+
DispatchQueue.main.asyncAfter(deadline: .now() + 1, execute: workItem)
5958
}
6059
}
6160

winston/models/WinstonTheme/CommentsTheme.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ struct CommentTheme: Codable, Hashable {
2020
var outerHPadding: CGFloat
2121
var repliesSpacing: CGFloat
2222
var indentCurve: CGFloat
23+
var indentColor: ColorSchemes<ThemeColor>
2324
var cornerRadius: CGFloat
2425
var badge: BadgeTheme
2526
var bodyText: ThemeText

0 commit comments

Comments
 (0)