Skip to content

Commit 3212e70

Browse files
committed
fix time format code in phone auth
1 parent c1fac83 commit 3212e70

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

FirebasePhoneAuthUI/FUIPhoneVerificationViewController.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,9 @@ - (void)resendConfirmationCodeTimerFinished {
264264
}
265265

266266
- (void)updateResendLabel {
267-
NSTimeInterval minutes = _resendConfirmationCodeSeconds / 60;
268-
NSTimeInterval seconds = (NSUInteger)_resendConfirmationCodeSeconds % 60;
269-
NSString *formattedTime = [NSString stringWithFormat:@"%01.0f:%02.0f", minutes, seconds];
267+
NSInteger minutes = _resendConfirmationCodeSeconds / 60; // Integer type for truncation
268+
NSInteger seconds = round(_resendConfirmationCodeSeconds % 60);
269+
NSString *formattedTime = [NSString stringWithFormat:@"%ld:%02ld", minutes, seconds];
270270

271271
_resendConfirmationCodeTimerLabel.text =
272272
[NSString stringWithFormat:FUIPhoneAuthLocalizedString(kPAStr_ResendCodeTimer),

0 commit comments

Comments
 (0)