Skip to content

Commit

Permalink
Merge pull request #95 from 0x1-company/share-default-text
Browse files Browse the repository at this point in the history
feat: 🎸 share default text
  • Loading branch information
tomokisun committed Jan 2, 2024
2 parents 98ea32d + 6e8ff9e commit f7b16ab
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
{
"sourceLanguage" : "en",
"strings" : {
"I found an app to increase BeReal's friends, try it.\n%@" : {
"localizations" : {
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "BeRealの友だち増やせるアプリ見つけたからやってみてw w w\n%@"
}
}
}
},
"Just a little... Too much swiping... Please help me share BeMatch... 🙏." : {
"localizations" : {
"ja" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ public struct RecommendationEmptyLogic {
}

public struct State: Equatable {
var sharedURL = Constants.appStoreForEmptyURL
var shareURL = Constants.appStoreForEmptyURL
var shareText: String {
return String(
localized: "I found an app to increase BeReal's friends, try it.\n\(shareURL.absoluteString)",
bundle: .module
)
}
@BindingState var isPresented = false
public init() {}
}
Expand Down Expand Up @@ -63,7 +69,7 @@ public struct RecommendationEmptyLogic {
return .none

case let .currentUserResponse(.success(data)):
state.sharedURL = data.currentUser.gender == .female
state.shareURL = data.currentUser.gender == .female
? Constants.appStoreFemaleForEmptyURL
: Constants.appStoreForEmptyURL
return .none
Expand Down Expand Up @@ -124,7 +130,7 @@ public struct RecommendationEmptyView: View {
.onAppear { store.send(.onAppear) }
.sheet(isPresented: viewStore.$isPresented) {
ActivityView(
activityItems: [viewStore.sharedURL],
activityItems: [viewStore.shareText],
applicationActivities: nil
) { activityType, result, _, _ in
store.send(
Expand Down

0 comments on commit f7b16ab

Please sign in to comment.