-
Notifications
You must be signed in to change notification settings - Fork 2
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
[mod] 오픈채팅방 유효성검사 #204
[mod] 오픈채팅방 유효성검사 #204
Changes from 2 commits
e4e4826
a5579f3
2de131e
4e16120
8e61153
30580e1
56bd2ab
5b15b9d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,8 @@ import org.sopt.pingle.presentation.ui.plan.plansummaryconfirmation.PlanSummaryC | |
import org.sopt.pingle.presentation.ui.plan.plantitle.PlanTitleFragment | ||
import org.sopt.pingle.util.base.BindingActivity | ||
import org.sopt.pingle.util.component.AllModalDialogFragment | ||
import org.sopt.pingle.util.component.PingleSnackbar | ||
import org.sopt.pingle.util.context.stringOf | ||
import org.sopt.pingle.util.view.PingleFragmentStateAdapter | ||
import org.sopt.pingle.util.view.UiState | ||
|
||
|
@@ -86,6 +88,18 @@ class PlanActivity : BindingActivity<ActivityPlanBinding>(R.layout.activity_plan | |
planViewModel.postPlanMeeting() | ||
} | ||
|
||
PLAN_OPEN_CHATTING_FRAGMENT_INDEX -> { | ||
if (planViewModel.validityOpenChattingLink()) { | ||
binding.vpPlan.currentItem++ | ||
} else { | ||
PingleSnackbar.makeSnackbar( | ||
binding.root, | ||
stringOf(R.string.plan_open_chatting_snackbar), | ||
126 | ||
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. 상수화 해주삼요 ㅋ 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. 스낵바 로직들이 어떤 것에 대한 스낵바인지 바로바로 알아보기가 어려워서 이거 함수화하거나 공통적으로 알아볼 수 있게 고치면 좋을 거 같아용 나중에 ! |
||
) | ||
} | ||
} | ||
|
||
else -> { | ||
binding.vpPlan.currentItem++ | ||
} | ||
|
@@ -175,5 +189,6 @@ class PlanActivity : BindingActivity<ActivityPlanBinding>(R.layout.activity_plan | |
const val FIRST_PAGE = 0 | ||
const val DEFAULT_PROGRESSBAR = 1f | ||
const val SUB_LIST_SIZE = 1 | ||
const val PLAN_OPEN_CHATTING_FRAGMENT_INDEX = 5 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -245,12 +245,15 @@ class PlanViewModel @Inject constructor( | |
} | ||
} | ||
|
||
fun validityOpenChattingLink() = planOpenChattingLink.value.startsWith(OPEN_CHATTING_LINK_VALIDITY) | ||
|
||
companion object { | ||
const val FIRST_PAGE_POSITION = 0 | ||
const val DEFAULT_OLD_POSITION = -1 | ||
const val DEFAULT_RECRUITMENT = "1" | ||
const val START_RECRUITMENT = 2 | ||
const val END_RECRUITMENT = 99 | ||
const val BLANK_STRING = " " | ||
const val OPEN_CHATTING_LINK_VALIDITY = "https://open.kakao.com/" | ||
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. 근데 https:// 없이 open.kakao.com/으로만 시작해도 연결 잘 되지 않나염?,, 이 부분 먼가 고민이 필요할 것 같아요 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. 테스트 결과.. 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. 그러면 링크에 open.kakao.com이 포함되는지 여부로 유효성 검사 진행해줘도 될 것 같고요,, 어찌 됐든 모든 경우의 수를 다 막을 순 없을 것 같아서,, 아요 측에서 이 부분 맡으신 분이랑 어떤 식으로 진행할 건지 논의가 필요할 것 같네요 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. 저도 다른 파트와의 논의가 필요할 거 같습니당 ~ 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. open.kakao.com가 포함되는 방향으로 논의했고 ios 측 답변오면 맞춰서 작업할게요!~ |
||
} | ||
} |
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.
여기 if~else문은 checkValidation 등으로 함수화해주면 코드가 더 깔끔해질 것 같아욤