Compare commits

..

8 Commits

Author SHA1 Message Date
4d333907bd Fix taps on mentions in note drafts to not redirect to other Nostr clients
Changelog-Fixed: Fix taps on mentions in note drafts to not redirect to other Nostr clients
2023-06-25 09:27:57 -04:00
422167f7aa Add indication of followers you know in a profile
Changelog-Added: Add indication of followers you know in a profile
2023-06-25 09:38:57 +02:00
William Casarin
de84456a57 mediaurl: fix is_img returning true for videos
This makes the image preloader try to download videos... not good.
2023-06-25 09:38:46 +02:00
William Casarin
b70bf1f647 v1.5-6 2023-06-25 09:38:46 +02:00
William Casarin
3db77a16a0 Fix timeline from moving when you're scrolling 2023-06-24 17:39:24 +02:00
William Casarin
2256e2e625 v1.5-5 changelog 2023-06-24 08:39:51 +02:00
William Casarin
a641f972ff v1.5-5 2023-06-24 08:38:02 +02:00
William Casarin
c5846008f2 fix weird quirk with universe toolbar filter button 2023-06-24 08:27:12 +02:00
7 changed files with 41 additions and 9 deletions

View File

@@ -1,3 +1,21 @@
## [1.5-5] - 2023-06-24
### Fixed
- Remove note zaps to fit apples appstore guidelines
- Fix zap sheet popping (William Casarin)
- Fix CustomizeZapView from randomly disappearing (William Casarin)
- Fix "zapped your profile" strings to say "zapped you" (Terry Yiu)
- Fix reconnect loop issues on iOS17 (William Casarin)
- Fix some more thread jankiness (William Casarin)
- Fix spelling of Nostr to use Titlecase instead of lowercase (Terry Yiu)
- Rename all usages of the term Post as a noun to Note to conform to the Nostr spec (Terry Yiu)
- Fix text cutoff on login with npub (gladiusKatana)
- Fix hangs due to video player (William Casarin)
[1.5-5]: https://github.com/damus-io/damus/releases/tag/v1.5-5
## [1.5-2] - 2023-05-30
### Added

View File

@@ -2236,7 +2236,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = damus/damus.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 6;
DEVELOPMENT_ASSET_PATHS = "\"damus/Preview Content\"";
DEVELOPMENT_TEAM = XK7H4JAB3D;
ENABLE_PREVIEWS = YES;
@@ -2284,7 +2284,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = damus/damus.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 6;
DEVELOPMENT_ASSET_PATHS = "\"damus/Preview Content\"";
DEVELOPMENT_TEAM = XK7H4JAB3D;
ENABLE_PREVIEWS = YES;

View File

@@ -310,13 +310,14 @@ struct ContentView: View {
if selected_timeline == .search {
Button(action: {
//isFilterVisible.toggle()
self.active_sheet = .filter
present_sheet(.filter)
}) {
// checklist, checklist.checked, lisdt.bullet, list.bullet.circle, line.3.horizontal.decrease..., line.3.horizontail.decrease
Label(NSLocalizedString("Filter", comment: "Button label text for filtering relay servers."), image: "filter")
.foregroundColor(.gray)
//.contentShape(Rectangle())
}
.buttonStyle(.plain)
}
}
}

View File

@@ -425,7 +425,7 @@ enum UrlType {
case .image(let url):
return url
case .video:
return url
return nil
}
case .link:
return nil

View File

@@ -79,13 +79,27 @@ struct PostView: View {
post.enumerateAttributes(in: NSRange(location: 0, length: post.length), options: []) { attributes, range, stop in
if let link = attributes[.link] as? String {
post.replaceCharacters(in: range, with: link)
let normalized_link: String
if link.hasPrefix("damus:nostr:") {
// Replace damus:nostr: URI prefix with nostr: since the former is for internal navigation and not meant to be posted.
normalized_link = String(link.dropFirst(6))
} else {
normalized_link = link
}
// Add zero-width space in case text preceding the mention is not a whitespace.
// In the case where the character preceding the mention is a whitespace, the added zero-width space will be stripped out.
post.replaceCharacters(in: range, with: "\u{200B}\(normalized_link)\u{200B}")
}
}
var content = self.post.string
// If two zero-width spaces are next to each other, normalize it to just one zero-width space.
.replacingOccurrences(of: "\u{200B}\u{200B}", with: "\u{200B}")
// If zero-width space is next to an actual whitespace, remove the zero-width space.
.replacingOccurrences(of: " \u{200B}", with: " ")
.replacingOccurrences(of: "\u{200B} ", with: " ")
.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)
.replacingOccurrences(of: "\u{200B}", with: "") // these characters are added when adding mentions.
let imagesString = uploadedMedias.map { $0.uploadedURL.absoluteString }.joined(separator: " ")

View File

@@ -63,7 +63,8 @@ struct UserSearch: View {
let tagAttributedString = NSMutableAttributedString(string: tagString,
attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 18.0),
NSAttributedString.Key.link: "nostr:\(pk)"])
// Add damus: URI so that taps within the post creation view redirect internally within Damus instead of redirecting to a different Nostr client. The damus: prefix will be stripped out prior to sending the note to relays.
NSAttributedString.Key.link: "damus:nostr:\(pk)"])
tagAttributedString.removeAttribute(.link, range: NSRange(location: tagAttributedString.length - 2, length: 2))
tagAttributedString.addAttributes([NSAttributedString.Key.foregroundColor: UIColor.label], range: NSRange(location: tagAttributedString.length - 2, length: 2))

View File

@@ -30,12 +30,10 @@ struct TimelineView: View {
.redacted(reason: loading ? .placeholder : [])
.shimmer(loading)
.disabled(loading)
/*
.background(GeometryReader { proxy -> Color in
handle_scroll_queue(proxy, queue: self.events)
return Color.clear
})
*/
}
.buttonStyle(BorderlessButtonStyle())
.coordinateSpace(name: "scroll")