-
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
Refactor/android/double click: 다중 클릭 방지 개선 및 UI, Notification 개선 #230
Merged
agfalcon
merged 10 commits into
boostcampwm2023:dev
from
p-chanmin:refactor/android/double-click
Dec 13, 2023
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0030d5b
refactor: 일정 초대 notification Action 분리
p-chanmin 8845730
feat: ClickEventUtil setMenuClickEvent 추가
p-chanmin f2c853d
refactor: 일정 추가 Activity 다중 클릭 방지 개선
p-chanmin 265c9a1
refactor: follow adapter, viewHolder 인자 전달 수정
p-chanmin 48030b8
refactor: 팔로우, 일정 초대 다중 클릭 방지 개선
p-chanmin 9aa94b0
refactor: 팔로우, 일정 초대 유저 목록 sort 적용
p-chanmin ffb33d9
refactor: 알림 목록 다중 클릭 방지 개선
p-chanmin ee3e3ba
bug: 알림 목록이 없을 때 API 호출 방지
p-chanmin 962b465
refactor: Setting 관련 Fragment 다중 클릭 방지 개선
p-chanmin c355d69
Merge branch 'dev' into refactor/android/double-click
LeeHaiLim 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,30 +9,29 @@ import com.teameetmeet.meetmeet.data.model.UserStatus | |
class FollowAdapter( | ||
private val actionType: FollowActionType, | ||
private val userClickListener: OnUserClickListener, | ||
private val id: Int? | ||
) : | ||
ListAdapter<UserStatus, FollowViewHolder>(ItemDiffCallback) { | ||
private val eventId: Int? | ||
) : ListAdapter<UserStatus, FollowViewHolder>(diffCallback) { | ||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): FollowViewHolder { | ||
return FollowViewHolder.from(parent) | ||
return FollowViewHolder.from(parent, actionType, userClickListener, eventId) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 뷰홀더 생성 시 인자 넣어주는 것 좋습니다!! |
||
} | ||
|
||
override fun onBindViewHolder(holder: FollowViewHolder, position: Int) { | ||
holder.bind(getItem(position), actionType, userClickListener, id) | ||
holder.bind(getItem(position)) | ||
} | ||
|
||
object ItemDiffCallback : DiffUtil.ItemCallback<UserStatus>() { | ||
override fun areItemsTheSame( | ||
oldItem: UserStatus, | ||
newItem: UserStatus | ||
): Boolean { | ||
return oldItem.id == newItem.id | ||
} | ||
companion object { | ||
private val diffCallback = object : DiffUtil.ItemCallback<UserStatus>() { | ||
override fun areItemsTheSame( | ||
oldItem: UserStatus, newItem: UserStatus | ||
): Boolean { | ||
return oldItem.id == newItem.id | ||
} | ||
|
||
override fun areContentsTheSame( | ||
oldItem: UserStatus, | ||
newItem: UserStatus | ||
): Boolean { | ||
return oldItem == newItem | ||
override fun areContentsTheSame( | ||
oldItem: UserStatus, newItem: UserStatus | ||
): Boolean { | ||
return oldItem == newItem | ||
} | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,12 +44,14 @@ class FollowNotificationViewModel @Inject constructor( | |
|
||
fun onDeleteAll() { | ||
viewModelScope.launch { | ||
userRepository.deleteUserNotification( | ||
_followNotificationList.value.map { it.inviteId }.joinToString(",") | ||
).catch { | ||
emitExceptionEvent(it, R.string.notification_delete_fail) | ||
}.collectLatest { | ||
fetchFollowNotificationList() | ||
if (_followNotificationList.value.isNotEmpty()) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 예외 처리 굳굳 좋습니다!! |
||
userRepository.deleteUserNotification( | ||
_followNotificationList.value.map { it.inviteId }.joinToString(",") | ||
).catch { | ||
emitExceptionEvent(it, R.string.notification_delete_fail) | ||
}.collectLatest { | ||
fetchFollowNotificationList() | ||
} | ||
} | ||
} | ||
} | ||
|
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.
menu click에 대한 더블 클릭을 구현하셨네요!!! 대단합니다..
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.
👍