-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]#72 홈 화면의 복사한 링크 저장하기 기능 구현 #75
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e3f45dd
[FEATURE] 링크 복사 후 홈 화면 진입시 복사한 링크 추가 화면으로 이동하는 toast 표시 기능 구현 및 Pokit…
l5x5l c59582f
[FIX] 로그인 화면에서 자동로그인 이벤트 발생시 화면 이동 이벤트가 2번 수행되는 문제 수정
l5x5l 64f5f09
[FEATURE] 홈 화면에서 복사된 링크 추가 토스트를 통해 링크 추가화면 진입시, 해당 링크 url로 설정하는 기능 구현
l5x5l 8785dcd
[CHORE] ktlint 적용
l5x5l cb98dc8
[FIX] 코드리뷰 내용 반영
l5x5l File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기서 현재 클립된 데이터를 지우는 이유가 있나영?.?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
클립보드 복사 -> 홈 화면 진입 -> 링크 추가 화면 진입 및 링크 추가 -> 다시 홈 화면 복귀 -> 홈 버튼 누른 후 앱 재진입
위 케이스에서 이미 저장한 클립 데이터가 남아있어서 다시 toast 메세지가 표시되는 현상이 있었어!
그래서 복사된 링크를 한번 설정하면 해당 링크로는 다시 toast 메세지가 발생하지 않게끔 하려는게 주 목적이었어
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아하 요건 그러면 파이 이상에서만 발생하는 건가?.?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
어 그러네 파이 미만부분이 아예 처리가 안되어있었구나
수정완!