-
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.
Browse files
Browse the repository at this point in the history
* [FEATURE] 링크 복사 후 홈 화면 진입시 복사한 링크 추가 화면으로 이동하는 toast 표시 기능 구현 및 PokitToast의 최대 line수를 2로 설정 * [FIX] 로그인 화면에서 자동로그인 이벤트 발생시 화면 이동 이벤트가 2번 수행되는 문제 수정 * [FEATURE] 홈 화면에서 복사된 링크 추가 토스트를 통해 링크 추가화면 진입시, 해당 링크 url로 설정하는 기능 구현 * [CHORE] ktlint 적용 * [FIX] 코드리뷰 내용 반영 - url링크 유효성 검증시 조건 단순화 - SDK 27 이하일 때 클립보드 초기화 누락 수정
- Loading branch information
Showing
11 changed files
with
120 additions
and
22 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
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
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
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
24 changes: 24 additions & 0 deletions
24
feature/home/src/main/java/pokitmons/pokit/home/model/ClipboardLinkManager.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,24 @@ | ||
package pokitmons.pokit.home.model | ||
|
||
import kotlinx.coroutines.CoroutineScope | ||
import kotlinx.coroutines.Dispatchers | ||
import kotlinx.coroutines.flow.MutableSharedFlow | ||
import kotlinx.coroutines.flow.SharedFlow | ||
import kotlinx.coroutines.flow.asSharedFlow | ||
import kotlinx.coroutines.launch | ||
|
||
object ClipboardLinkManager { | ||
private val _clipboardLinkUrl: MutableSharedFlow<String> = MutableSharedFlow() | ||
val clipboardLinkUrl: SharedFlow<String> = _clipboardLinkUrl.asSharedFlow() | ||
|
||
fun setClipboardLink(linkUrl: String) { | ||
CoroutineScope(Dispatchers.IO).launch { | ||
_clipboardLinkUrl.emit(linkUrl) | ||
} | ||
} | ||
|
||
fun checkUrlIsValid(url: String): Boolean { | ||
val isValidUrl = url.startsWith("http://") || url.startsWith("https://") | ||
return isValidUrl | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
feature/home/src/main/java/pokitmons/pokit/home/model/LinkAddToastMessage.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,3 @@ | ||
package pokitmons.pokit.home.model | ||
|
||
data class LinkAddToastMessage(val linkUrl: String) |
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
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