-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from YAPP-Github/feature/sksowk156/PC-292
[PC-292] 로그인 화면, 번호 인증 화면 ui 구현
- Loading branch information
Showing
51 changed files
with
1,433 additions
and
259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
core/common-ui/src/androidTest/java/com/puzzle/common/ui/ExampleInstrumentedTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<manifest> | ||
|
||
</manifest> |
3 changes: 1 addition & 2 deletions
3
core/common-ui/src/test/java/com/puzzle/common/ui/ExampleUnitTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<manifest> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
core/data/src/main/java/com/puzzle/data/repository/AuthCodeRepositoryImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.puzzle.data.repository | ||
|
||
import com.puzzle.domain.repository.AuthCodeRepository | ||
import javax.inject.Inject | ||
|
||
class AuthCodeRepositoryImpl @Inject constructor() : AuthCodeRepository { | ||
override suspend fun requestAuthCode(phoneNumber: String): Boolean { | ||
return true | ||
} | ||
|
||
override suspend fun verify(code: String): Boolean { | ||
return true | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
core/data/src/main/java/com/puzzle/data/util/TimerManagerImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package com.puzzle.data.util | ||
|
||
import com.puzzle.domain.util.TimerManager | ||
import kotlinx.coroutines.CoroutineScope | ||
import kotlinx.coroutines.Dispatchers | ||
import kotlinx.coroutines.Job | ||
import kotlinx.coroutines.delay | ||
import kotlinx.coroutines.launch | ||
import kotlinx.coroutines.withContext | ||
import java.util.concurrent.atomic.AtomicInteger | ||
import javax.inject.Inject | ||
|
||
class TimerManagerImpl @Inject constructor() : TimerManager { | ||
private var timerJob: Job? = null | ||
private val remainingTime = AtomicInteger(0) | ||
|
||
override fun startTimer( | ||
durationInSec: Int, | ||
onTick: (remainingSec: Int) -> Unit, | ||
onTimeExpired: () -> Unit | ||
) { | ||
stopTimer() | ||
|
||
remainingTime.set(durationInSec) | ||
|
||
timerJob = CoroutineScope(Dispatchers.Default).launch { | ||
while (remainingTime.get() >= 0) { | ||
withContext(Dispatchers.Main) { | ||
onTick(remainingTime.get()) | ||
} | ||
|
||
if (remainingTime.get() == 0) { | ||
break | ||
} | ||
|
||
delay(1000L) | ||
remainingTime.decrementAndGet() | ||
} | ||
|
||
withContext(Dispatchers.Main) { | ||
onTimeExpired() | ||
} | ||
} | ||
} | ||
|
||
override fun stopTimer() { | ||
timerJob?.cancel() | ||
timerJob = null | ||
remainingTime.set(0) | ||
} | ||
|
||
override fun isTimeRemaining(): Boolean { | ||
return remainingTime.get() > 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<manifest> | ||
|
||
</manifest> |
3 changes: 1 addition & 2 deletions
3
core/database/src/test/java/com/puzzle/database/ExampleUnitTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
core/designsystem/src/androidTest/java/com/puzzle/designsystem/ExampleInstrumentedTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<manifest> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.