Rename boost to repost and removed nip05 domain from them
Changelog-Changed: Renamed boost to repost Changelog-Changed: Removed nip05 domain from boosts/reposts
This commit is contained in:
@@ -117,6 +117,7 @@
|
|||||||
4CB55EF5295E679D007FD187 /* UserRelaysView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB55EF4295E679D007FD187 /* UserRelaysView.swift */; };
|
4CB55EF5295E679D007FD187 /* UserRelaysView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB55EF4295E679D007FD187 /* UserRelaysView.swift */; };
|
||||||
4CB8838629656C8B00DC99E7 /* NIP05.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB8838529656C8B00DC99E7 /* NIP05.swift */; };
|
4CB8838629656C8B00DC99E7 /* NIP05.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB8838529656C8B00DC99E7 /* NIP05.swift */; };
|
||||||
4CB8838B296F6E1E00DC99E7 /* NIP05Badge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB8838A296F6E1E00DC99E7 /* NIP05Badge.swift */; };
|
4CB8838B296F6E1E00DC99E7 /* NIP05Badge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB8838A296F6E1E00DC99E7 /* NIP05Badge.swift */; };
|
||||||
|
4CB8838D296F710400DC99E7 /* Reposted.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB8838C296F710400DC99E7 /* Reposted.swift */; };
|
||||||
4CD7641B28A1641400B6928F /* EndBlock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CD7641A28A1641400B6928F /* EndBlock.swift */; };
|
4CD7641B28A1641400B6928F /* EndBlock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CD7641A28A1641400B6928F /* EndBlock.swift */; };
|
||||||
4CE4F8CD281352B30009DFBB /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4F8CC281352B30009DFBB /* Notifications.swift */; };
|
4CE4F8CD281352B30009DFBB /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4F8CC281352B30009DFBB /* Notifications.swift */; };
|
||||||
4CE4F9DE2852768D00C00DD9 /* ConfigView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4F9DD2852768D00C00DD9 /* ConfigView.swift */; };
|
4CE4F9DE2852768D00C00DD9 /* ConfigView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4F9DD2852768D00C00DD9 /* ConfigView.swift */; };
|
||||||
@@ -310,6 +311,7 @@
|
|||||||
4CB55EF4295E679D007FD187 /* UserRelaysView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserRelaysView.swift; sourceTree = "<group>"; };
|
4CB55EF4295E679D007FD187 /* UserRelaysView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserRelaysView.swift; sourceTree = "<group>"; };
|
||||||
4CB8838529656C8B00DC99E7 /* NIP05.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NIP05.swift; sourceTree = "<group>"; };
|
4CB8838529656C8B00DC99E7 /* NIP05.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NIP05.swift; sourceTree = "<group>"; };
|
||||||
4CB8838A296F6E1E00DC99E7 /* NIP05Badge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NIP05Badge.swift; sourceTree = "<group>"; };
|
4CB8838A296F6E1E00DC99E7 /* NIP05Badge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NIP05Badge.swift; sourceTree = "<group>"; };
|
||||||
|
4CB8838C296F710400DC99E7 /* Reposted.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Reposted.swift; sourceTree = "<group>"; };
|
||||||
4CD7641A28A1641400B6928F /* EndBlock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EndBlock.swift; sourceTree = "<group>"; };
|
4CD7641A28A1641400B6928F /* EndBlock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EndBlock.swift; sourceTree = "<group>"; };
|
||||||
4CE4F8CC281352B30009DFBB /* Notifications.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Notifications.swift; sourceTree = "<group>"; };
|
4CE4F8CC281352B30009DFBB /* Notifications.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Notifications.swift; sourceTree = "<group>"; };
|
||||||
4CE4F9DD2852768D00C00DD9 /* ConfigView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfigView.swift; sourceTree = "<group>"; };
|
4CE4F9DD2852768D00C00DD9 /* ConfigView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfigView.swift; sourceTree = "<group>"; };
|
||||||
@@ -573,6 +575,7 @@
|
|||||||
4C3EA67C28FFBBA200C48A62 /* InvoicesView.swift */,
|
4C3EA67C28FFBBA200C48A62 /* InvoicesView.swift */,
|
||||||
4C3EA67E28FFC01D00C48A62 /* InvoiceView.swift */,
|
4C3EA67E28FFC01D00C48A62 /* InvoiceView.swift */,
|
||||||
4CB8838A296F6E1E00DC99E7 /* NIP05Badge.swift */,
|
4CB8838A296F6E1E00DC99E7 /* NIP05Badge.swift */,
|
||||||
|
4CB8838C296F710400DC99E7 /* Reposted.swift */,
|
||||||
);
|
);
|
||||||
path = Components;
|
path = Components;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -815,6 +818,7 @@
|
|||||||
4C363A8C28236B92006E126D /* PubkeyView.swift in Sources */,
|
4C363A8C28236B92006E126D /* PubkeyView.swift in Sources */,
|
||||||
4C5C7E68284ED36500A22DF5 /* SearchHomeModel.swift in Sources */,
|
4C5C7E68284ED36500A22DF5 /* SearchHomeModel.swift in Sources */,
|
||||||
4C75EFB728049D990006080F /* RelayPool.swift in Sources */,
|
4C75EFB728049D990006080F /* RelayPool.swift in Sources */,
|
||||||
|
4CB8838D296F710400DC99E7 /* Reposted.swift in Sources */,
|
||||||
4C3EA67728FF7A9800C48A62 /* talstr.c in Sources */,
|
4C3EA67728FF7A9800C48A62 /* talstr.c in Sources */,
|
||||||
4CE6DEE927F7A08100C66700 /* ContentView.swift in Sources */,
|
4CE6DEE927F7A08100C66700 /* ContentView.swift in Sources */,
|
||||||
4CEE2AF5280B29E600AB5EEF /* TimeAgo.swift in Sources */,
|
4CEE2AF5280B29E600AB5EEF /* TimeAgo.swift in Sources */,
|
||||||
|
|||||||
34
damus/Components/Reposted.swift
Normal file
34
damus/Components/Reposted.swift
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
//
|
||||||
|
// Reposted.swift
|
||||||
|
// damus
|
||||||
|
//
|
||||||
|
// Created by William Casarin on 2023-01-11.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct Reposted: View {
|
||||||
|
let damus: DamusState
|
||||||
|
let pubkey: String
|
||||||
|
let profile: Profile?
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
HStack(alignment: .center) {
|
||||||
|
Image(systemName: "arrow.2.squarepath")
|
||||||
|
.font(.footnote)
|
||||||
|
.foregroundColor(Color.gray)
|
||||||
|
ProfileName(pubkey: pubkey, profile: profile, damus: damus, show_friend_confirmed: true, show_nip5_domain: false)
|
||||||
|
.foregroundColor(Color.gray)
|
||||||
|
Text("Reposted", comment: "Text indicating that the post was reposted (i.e. re-shared).")
|
||||||
|
.font(.footnote)
|
||||||
|
.foregroundColor(Color.gray)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct Reposted_Previews: PreviewProvider {
|
||||||
|
static var previews: some View {
|
||||||
|
let test_state = test_damus_state()
|
||||||
|
Reposted(damus: test_state, pubkey: test_state.pubkey, profile: make_test_profile())
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -94,26 +94,9 @@ struct Profile: Codable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
func make_test_profile() -> Profile {
|
||||||
struct Profile: Decodable {
|
return Profile(name: "jb55", display_name: "Will", about: "Its a me", picture: "https://cdn.jb55.com/img/red-me.jpg", website: "jb55.com", lud06: "jb55@jb55.com", lud16: nil, nip05: "jb55@jb55.com")
|
||||||
let name: String?
|
|
||||||
let display_name: String?
|
|
||||||
let about: String?
|
|
||||||
let picture: String?
|
|
||||||
let website: String?
|
|
||||||
let nip05: String?
|
|
||||||
let lud06: String?
|
|
||||||
let lud16: String?
|
|
||||||
|
|
||||||
var lightning_uri: URL? {
|
|
||||||
return make_ln_url(self.lud06) ?? make_ln_url(self.lud16)
|
|
||||||
}
|
|
||||||
|
|
||||||
static func displayName(profile: Profile?, pubkey: String) -> String {
|
|
||||||
return profile?.name ?? abbrev_pubkey(pubkey)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
func make_ln_url(_ str: String?) -> URL? {
|
func make_ln_url(_ str: String?) -> URL? {
|
||||||
return str.flatMap { URL(string: "lightning:" + $0) }
|
return str.flatMap { URL(string: "lightning:" + $0) }
|
||||||
|
|||||||
@@ -172,17 +172,7 @@ struct EventView: View {
|
|||||||
let booster_profile = ProfileView(damus_state: damus, profile: prof_model, followers: follow_model)
|
let booster_profile = ProfileView(damus_state: damus, profile: prof_model, followers: follow_model)
|
||||||
|
|
||||||
NavigationLink(destination: booster_profile) {
|
NavigationLink(destination: booster_profile) {
|
||||||
HStack {
|
Reposted(damus: damus, pubkey: event.pubkey, profile: prof)
|
||||||
Image(systemName: "arrow.2.squarepath")
|
|
||||||
.font(.footnote.weight(.bold))
|
|
||||||
.foregroundColor(Color.gray)
|
|
||||||
ProfileName(pubkey: event.pubkey, profile: prof, damus: damus, show_friend_confirmed: true)
|
|
||||||
.font(.footnote.weight(.bold))
|
|
||||||
.foregroundColor(Color.gray)
|
|
||||||
Text("Boosted", comment: "Text indicating that the post was boosted (i.e. re-shared).")
|
|
||||||
.font(.footnote.weight(.bold))
|
|
||||||
.foregroundColor(Color.gray)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.buttonStyle(PlainButtonStyle())
|
.buttonStyle(PlainButtonStyle())
|
||||||
TextEvent(inner_ev, pubkey: inner_ev.pubkey)
|
TextEvent(inner_ev, pubkey: inner_ev.pubkey)
|
||||||
|
|||||||
@@ -35,8 +35,6 @@ struct ProfileName: View {
|
|||||||
@State var display_name: String?
|
@State var display_name: String?
|
||||||
@State var nip05: NIP05?
|
@State var nip05: NIP05?
|
||||||
|
|
||||||
@Environment(\.openURL) var openURL
|
|
||||||
|
|
||||||
init(pubkey: String, profile: Profile?, damus: DamusState, show_friend_confirmed: Bool, show_nip5_domain: Bool = true) {
|
init(pubkey: String, profile: Profile?, damus: DamusState, show_friend_confirmed: Bool, show_nip5_domain: Bool = true) {
|
||||||
self.pubkey = pubkey
|
self.pubkey = pubkey
|
||||||
self.profile = profile
|
self.profile = profile
|
||||||
|
|||||||
Reference in New Issue
Block a user