Skip to content

Commit 08fae5e

Browse files
committed
Quick fixes
1 parent d9b99d8 commit 08fae5e

31 files changed

Lines changed: 91 additions & 89 deletions

TestFlight/WhatToTest.en-US.txt

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1-
--- QUICK EXPRESS UPDATE ---
2-
- Fixes a major performance issue that I hadn't notice before
3-
- Fixes flair tag centered again
4-
- Tries to fix a few remaining errors related to themes
5-
--- QUICK EXPRESS UPDATE ---
6-
- Fixed crash when replying
7-
- Fixed crash when importing new themes
8-
- Fixed crash when long pressing on comment
9-
- Fixed random name in exported themes
10-
- Now exported themes have ".winston" extension (zip will continue to work though)
11-
- Sharing zip to winston is now allowed
12-
- ".winston" open in one tap into winston and imports it
13-
- Fixed subs not showing up in multis
14-
- Fixed centered tags in post links
1+
A big update is coming soon, sorry for the wait.
152

3+
--- QUICK EXPRESS UPDATE ---
4+
- Fixed subs order
5+
- Fixed subs filtering
6+
- Fixed favoriting subs not working properly

winston.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 23 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

winston/Tabber.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,13 @@ struct Tabber: View {
178178
, alignment: .bottom
179179
)
180180
.overlay(
181-
tabBarHeight.isNil
181+
tabBarHeight == nil
182182
? nil
183183
: TabBarOverlay(router: payload[activeTab]!.router, tabHeight: tabHeight, meTabTap: meTabTap).id(payload[activeTab]!.router.id)
184184
, alignment: .bottom
185185
)
186186
.background(OFWOpener(router: payload[TabIdentifier.posts]!.router))
187-
.fullScreenCover(isPresented: Binding(get: { !tempGlobalState.inAppBrowserURL.isNil }, set: { val in
187+
.fullScreenCover(isPresented: Binding(get: { tempGlobalState.inAppBrowserURL != nil }, set: { val in
188188
tempGlobalState.inAppBrowserURL = nil
189189
})) {
190190
if let url = tempGlobalState.inAppBrowserURL {

winston/components/LightBoxImage/LightBoxImage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ struct LightBoxImage: View {
6262
: DragGesture(minimumDistance: 20)
6363
.onChanged { val in
6464

65-
if dragAxis.isNil || dragOffset.isNil {
65+
if dragAxis == nil || dragOffset == nil {
6666
dragOffset = val.translation
6767
if abs(val.predictedEndTranslation.width) > abs(val.predictedEndTranslation.height) {
6868
dragAxis = .horizontal

winston/components/Links/CommentLink/CommentLinkContent.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ struct CommentLinkContent: View {
215215
Text(body.md())
216216
.lineLimit(lineLimit)
217217
} else {
218-
MD(data.winstonBodyAttrEncoded.isNil ? .str(body) : .json(data.winstonBodyAttrEncoded!), fontSize: theme.theme.bodyText.size)
218+
MD(data.winstonBodyAttrEncoded == nil ? .str(body) : .json(data.winstonBodyAttrEncoded!), fontSize: theme.theme.bodyText.size)
219219
.fixedSize(horizontal: false, vertical: true)
220220
.overlay(
221221
!selectable

winston/components/Links/PostInBoxLink.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ struct PostInBoxLink: View {
163163
var endingY: CGFloat = 0
164164
let endPos = dragVal?.translation.height ?? 0
165165
let predictedEnd = dragVal?.predictedEndTranslation.height ?? 0
166-
if !dragVal.isNil {
166+
if dragVal != nil {
167167
if predictedEnd > 300 || (endPos > 70 && predictedEnd > 0) { endingY = 300 }
168168
if predictedEnd < -300 || (endPos < 70 && predictedEnd < 0) { endingY = -300 }
169169
}

winston/components/Links/PostLink/FlairTag.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ struct FlairTag: View {
1818
Text(text)
1919
.padding(.vertical, 2)
2020
}
21-
.fontSize(13, data.isNil ? .regular : .semibold)
22-
.padding(.leading, data.isNil ? 9 : 0)
21+
.fontSize(13, data == nil ? .regular : .semibold)
22+
.padding(.leading, data == nil ? 9 : 0)
2323
.padding(.trailing, 9)
2424
.background(Capsule(style: .continuous).fill(color.opacity(0.2)))
2525
.foregroundColor(.primary.opacity(0.5))

winston/components/Links/PostLink/getPostContentWidth.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ struct PostDimensions: Hashable, Equatable {
3636
var size: CGSize {
3737

3838
let compactVSpacing = self.spacingHeight / 2
39-
let tagHeight = urlTagHeight.isNil ? 0 : (compactVSpacing / 2) + (self.urlTagHeight ?? 0)
39+
let tagHeight = urlTagHeight == nil ? 0 : (compactVSpacing / 2) + (self.urlTagHeight ?? 0)
4040
let compactHeight = max(self.titleSize.height + compactVSpacing + self.badgeSize.height + tagHeight, (mediaSize?.height ?? 0)) + dividerSize.height + compactVSpacing
4141
let normalHeight = self.titleSize.height + (self.bodySize?.height ?? 0) + (self.mediaSize?.height ?? 0) + self.dividerSize.height + self.badgeSize.height + self.spacingHeight
4242
return CGSize(
@@ -137,7 +137,7 @@ func getPostDimensions(post: Post, columnWidth: Double = UIScreen.screenWidth, s
137137
}
138138

139139

140-
let compactTitleWidth = postGeneralSpacing + VotesCluster.verticalWidth + (extractedMedia.isNil ? 0 : postGeneralSpacing + compactMediaSize.width)
140+
let compactTitleWidth = postGeneralSpacing + VotesCluster.verticalWidth + (extractedMedia == nil ? 0 : postGeneralSpacing + compactMediaSize.width)
141141
let titleContentWidth = contentWidth - (compact ? compactTitleWidth : 0)
142142

143143
ACC_titleHeight = round(NSString(string: title).boundingRect(with: CGSize(width: titleContentWidth, height: .infinity), options: [.usesLineFragmentOrigin], attributes: [.font: UIFont.systemFont(ofSize: theme.titleText.size, weight: theme.titleText.weight.ut)], context: nil).height)
@@ -164,7 +164,7 @@ func getPostDimensions(post: Post, columnWidth: Double = UIScreen.screenWidth, s
164164

165165
let theresTitle = true
166166
let theresSelftext = !compact && !data.selftext.isEmpty
167-
let theresMedia = !extractedMedia.isNil
167+
let theresMedia = extractedMedia != nil
168168
let theresSubDivider = true
169169
let theresBadge = true
170170
let elements = [theresTitle, theresSelftext, !compact && theresMedia, theresSubDivider, theresBadge]

winston/components/Media/ImageMediaPost/GalleryThumb.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ struct GalleryThumb: View, Equatable {
2626
.scaledToFill()
2727
.zIndex(1)
2828
.allowsHitTesting(false)
29-
.fixedSize(horizontal: false, vertical: height.isNil)
29+
.fixedSize(horizontal: false, vertical: height == nil)
3030
.frame(width: width, height: height)
3131
.clipped()
3232
.mask(RR(selectedTheme.postLinks.theme.mediaCornerRadius, Color.black))

winston/components/Media/PreviewLink/PreviewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ final class PreviewModel: ObservableObject {
2121

2222
var previewURL: URL? {
2323
didSet {
24-
if !previewURL.isNil { fetchMetadata() }
24+
if previewURL != nil { fetchMetadata() }
2525
}
2626
}
2727

0 commit comments

Comments
 (0)