Skip to content

Commit

Permalink
Fix the issue related to Resend button is not working
Browse files Browse the repository at this point in the history
  • Loading branch information
Suraj1999 committed Jan 8, 2024
1 parent 5130070 commit bbb0b69
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 11 deletions.
3 changes: 2 additions & 1 deletion animeal/res/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
"verification.title" = "Enter verification code";
"verification.subtitle.filled" = "Code was sent to:";
"verification.subtitle.empty" = "Code was sent to destination";
"verification.resendCode.title" = "Resend code in";
"verification.resendCode.title" = "Resend code";
"verification.resendCode.titleTime" = "Resend code in";
"verification.error.codeDigitsCountDoesNotFit" = "Code digits count doesn’t fit";
"verification.error.codeRequestTimeLimitExceeded" = "Code request time limit exceeded";
"verification.error.codeUnsupportedNextStep" = "Code unsupported next step";
Expand Down
3 changes: 2 additions & 1 deletion animeal/res/ka.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
"verification.title" = "შეიყვანეთ დამადასტურებელი კოდი";
"verification.subtitle.filled" = "კოდი გაიგზავნა:";
"verification.subtitle.empty" = "კოდი გაიგზავნა დანიშნულების ადგილზე";
"verification.resendCode.title" = "კოდის ხელახლა გაგზავნა";
"verification.resendCode.title" = "Კოდის გადაგზავნა";
"verification.resendCode.titleTime" = "კოდის ხელახლა გაგზავნა";
"verification.error.codeDigitsCountDoesNotFit" = "კოდის ციფრების რაოდენობა არ ჯდება";
"verification.error.codeRequestTimeLimitExceeded" = "კოდის მოთხოვნის დროის ლიმიტი გადაჭარბებულია";
"verification.error.codeUnsupportedNextStep" = "შემდეგი ნაბიჯის კოდი მხარდაუჭერელია";
Expand Down
8 changes: 5 additions & 3 deletions animeal/res/sheet.csv
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"action.openSettings","","Open settings","გახსენით პარამეტრები","","","","","","","","","","","","","","","","","","","","","","",""
"question.logoutAccount","","Are you sure you want to log out of your account?","დარწმუნებული ხართ, რომ გსურთ თქვენი ანგარიშიდან გამოსვლა?","","","","","","","","","","","","","","","","","","","","","","",""
"question.deleteAccount","","Are you sure you want to delete your account?","დარწმუნებული ხართ, რომ გსურთ თქვენი ანგარიშის წაშლა?","","","","","","","","","","","","","","","","","","","","","","",""
"action.min","","min","წუთი","","","","","","","","","","","","","","","","","","","","","","",""
"text.header.lastFeeder","","Last feeder","ბოლო მიმწოდებელი","","","","","","","","","","","","","","","","","","","","","","",""
"text.oneHourToFeed","","You will have 1 hour to feed the point","თქვენ გექნებათ 1 საათი წერტილის შესანახად","","","","","","","","","","","","","","","","","","","","","","",""
"text.thankYou","","Thank You!","Გმადლობთ","","","","","","","","","","","","","","","","","","","","","","",""
Expand All @@ -69,7 +70,7 @@
"verification.title","","Enter verification code","შეიყვანეთ დამადასტურებელი კოდი","","","","","","","","","","","","","","","","","","","","","","",""
"verification.subtitle.filled","","Code was sent to:","კოდი გაიგზავნა:","","","","","","","","","","","","","","","","","","","","","","",""
"verification.subtitle.empty","","Code was sent to destination","კოდი გაიგზავნა დანიშნულების ადგილზე","","","","","","","","","","","","","","","","","","","","","","",""
"verification.resendCode.title","","Resend code in","კოდის ხელახლა გაგზავნა","","","","","","","","","","","","","","","","","","","","","","",""
"verification.resendCode.title","","Resend code ","Კოდის გადაგზავნა","","","","","","","","","","","","","","","","","","","","","","",""
"verification.error.codeDigitsCountDoesNotFit","","Code digits count doesn’t fit","კოდის ციფრების რაოდენობა არ ჯდება","","","","","","","","","","","","","","","","","","","","","","",""
"verification.error.codeRequestTimeLimitExceeded","","Code request time limit exceeded","კოდის მოთხოვნის დროის ლიმიტი გადაჭარბებულია","","","","","","","","","","","","","","","","","","","","","","",""
"verification.error.codeUnsupportedNextStep","","Code unsupported next step","შემდეგი ნაბიჯის კოდი მხარდაუჭერელია","","","","","","","","","","","","","","","","","","","","","","",""
Expand Down Expand Up @@ -101,7 +102,8 @@ Please contact us at %@","ვერ იპოვეთ თქვენი შე
"donate.title","","Donate","შემოწირულობა","","","","","","","","","","","","","","","","","","","","","","",""
"donate.header.text","","We can leave a donation for animals and in support of the developers","ჩვენ შეგვიძლია დავტოვოთ შემოწირულობა ცხოველებისთვის და დეველოპერების მხარდასაჭერად","","","","","","","","","","","","","","","","","","","","","","",""
"donate.footer.text","","Thank you for donating!","გმადლობთ შემოწირულობისთვის!","","","","","","","","","","","","","","","","","","","","","","",""
"donate.copy.text","","Text is copied","ანგარიში დაკოპირებულია","","","","","","","","","","","","","","","","","","","","","","",""
"donate.copy.text","","Text copied","ტექსტი დაკოპირებულია","","","","","","","","","","","","","","","","","","","","","","",""
"about.appVersion","","App version","აპლიკაციის ვერსია","","","","","","","","","","","","","","","","","","","","","","",""
"leaderBoard.header","","Leaderboard","ლიდერბორდი","","","","","","","","","","","","","","","","","","","","","","",""
"leaderBoard.empty","","Leaderboard will show the rating of volunteers","ლიდერბორდი აჩვენებს მოხალისეთა რეიტინგს","","","","","","","","","","","","","","","","","","","","","","",""
"leaderBoard.empty","","Leaderboard will show the rating of volunteers","ლიდერბორდი აჩვენებს მოხალისეთა რეიტინგს","","","","","","","","","","","","","","","","","","","","","","",""
"verification.resendCode.titleTime","","Resend code in","კოდის ხელახლა გაგზავნა","","","","","","","","","","","","","","","","","","","","","","",""
4 changes: 3 additions & 1 deletion animeal/src/Common/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,10 @@ internal enum L10n {
internal static let codeUnsupportedNextStep = L10n.tr("Localizable", "verification.error.codeUnsupportedNextStep", fallback: "Code unsupported next step")
}
internal enum ResendCode {
/// Resend code
internal static let title = L10n.tr("Localizable", "verification.resendCode.title", fallback: "Resend code")
/// Resend code in
internal static let title = L10n.tr("Localizable", "verification.resendCode.title", fallback: "Resend code in")
internal static let titleTime = L10n.tr("Localizable", "verification.resendCode.titleTime", fallback: "Resend code in")
}
internal enum Subtitle {
/// Code was sent to destination
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ final class VerificationAfterCustomAuthWorker: VerificationModelWorker {
func resendCode(
forAttribute attribute: VerificationModelAttribute
) async throws -> VerificationModelNextStep {
try await authenticationService.signOut()
let result = try await authenticationService.signIn(
username: AuthenticationInput { attribute.value }
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,16 @@ final class VerificationViewModel: VerificationViewModelLifeCycle, VerificationV
model.requestNewCodeTimeLeft = { modelTimeLeft in
Task { [weak self] in
guard let self else { return }
let text = modelTimeLeft.time > 0 ?
L10n.Verification.ResendCode.titleTime :
L10n.Verification.ResendCode.title
let time = modelTimeLeft.time > 0 ? self.timeFormatter.string(
from: TimeInterval(modelTimeLeft.time)
) : nil
self.onResendCodeHasBeenPrepared?(
VereficationViewResendCode(
title: L10n.Verification.ResendCode.title,
timeLeft: self.timeFormatter.string(
from: TimeInterval(modelTimeLeft.time)
)
title: text,
timeLeft: time
)
)
}
Expand Down

0 comments on commit bbb0b69

Please sign in to comment.