Skip to content

Commit

Permalink
Merge branch 'fix/design_detail' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim-swit committed Mar 18, 2024
2 parents 2da718a + 42fbcc0 commit 314bbce
Show file tree
Hide file tree
Showing 16 changed files with 174 additions and 97 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package org.gdsc.presentation.view.home
import android.content.Intent
import android.graphics.PointF
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand Down Expand Up @@ -197,9 +198,7 @@ class HomeFragment : Fragment(), ViewHolderBindListener {
private fun setGroup() {
binding.groupArrow.setOnClickListener {
lifecycleScope.launch {
viewModel.getMyGroup().let { groupList ->
viewModel.setGroupList(groupList)
}
viewModel.requestGroupList()
}

BottomSheetDialog(requireContext())
Expand Down Expand Up @@ -436,16 +435,8 @@ class HomeFragment : Fragment(), ViewHolderBindListener {
viewModel.setSortType(SortType.DISTANCE)
}

repeatWhenUiStarted {
viewModel.myGroupList.collect {
binding.groupName.text
}
}

lifecycleScope.launch {
viewModel.getMyGroup().let { groupList ->
viewModel.setGroupList(groupList)
}
viewModel.requestGroupList()
}

repeatWhenUiStarted {
Expand All @@ -455,7 +446,6 @@ class HomeFragment : Fragment(), ViewHolderBindListener {
val groupList = state.response

if (groupList.isEmpty()) {
viewModel.setCurrentGroup(null)
bottomSheetDialog.show()
} else {
groupList.forEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ class HomeViewModel @Inject constructor(
get() = _myGroupList


private var _currentGroup = MutableStateFlow<Group?>(null)
val currentGroup: StateFlow<Group?>
private var _currentGroup: MutableStateFlow<Group> = MutableStateFlow(Group(0, "", "", "", "", 0, 0, false, false))
val currentGroup: StateFlow<Group>
get() = _currentGroup


Expand Down Expand Up @@ -118,7 +118,7 @@ class HomeViewModel @Inject constructor(
_myGroupList.value = ResultState.OnSuccess(groupList)
}

fun setCurrentGroup(group: Group?) {
fun setCurrentGroup(group: Group) {
_currentGroup.value = group
}

Expand Down Expand Up @@ -163,8 +163,8 @@ class HomeViewModel @Inject constructor(
return getRestaurantMapWithLimitCountUseCase(sortType, group)
}

suspend fun getMyGroup(): List<Group> {
return getMyGroupUseCase()
suspend fun requestGroupList() {
_myGroupList.value = ResultState.OnSuccess(getMyGroupUseCase())
}

suspend fun selectGroup(groupID: Int) {
Expand Down
9 changes: 9 additions & 0 deletions presentation/src/main/res/drawable/ic_apple.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="25dp"
android:height="24dp"
android:viewportWidth="25"
android:viewportHeight="24">
<path
android:pathData="M21.961,18.145C21.635,18.892 21.232,19.604 20.758,20.271C20.126,21.159 19.606,21.772 19.208,22.114C18.59,22.672 17.925,22.959 17.215,22.975C16.706,22.975 16.091,22.833 15.375,22.543C14.656,22.255 13.997,22.114 13.392,22.114C12.759,22.114 12.081,22.255 11.354,22.543C10.628,22.833 10.042,22.984 9.593,22.998C8.913,23.027 8.233,22.733 7.556,22.114C7.124,21.743 6.583,21.107 5.934,20.206C5.239,19.247 4.667,18.13 4.22,16.86C3.74,15.486 3.5,14.157 3.5,12.87C3.5,11.397 3.824,10.125 4.473,9.06C4.964,8.223 5.666,7.525 6.511,7.033C7.345,6.542 8.296,6.277 9.268,6.267C9.81,6.267 10.52,6.431 11.4,6.755C12.28,7.079 12.845,7.243 13.092,7.243C13.278,7.243 13.903,7.05 14.968,6.667C15.973,6.312 16.822,6.165 17.517,6.223C19.401,6.372 20.816,7.101 21.757,8.416C20.073,9.42 19.24,10.824 19.257,12.626C19.271,14.03 19.79,15.198 20.808,16.125C21.258,16.548 21.783,16.887 22.357,17.124C22.232,17.479 22.1,17.818 21.961,18.145ZM17.641,1.441C17.641,2.541 17.231,3.568 16.417,4.519C15.432,5.648 14.243,6.302 12.953,6.199C12.936,6.061 12.928,5.922 12.928,5.783C12.928,4.726 13.394,3.596 14.227,2.671C14.642,2.204 15.17,1.814 15.809,1.504C16.448,1.198 17.051,1.029 17.619,1C17.634,1.148 17.641,1.295 17.641,1.441Z"
android:fillColor="#ffffff"/>
</vector>
18 changes: 18 additions & 0 deletions presentation/src/main/res/drawable/ic_jmt_logo_grey.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="100dp"
android:height="100dp"
android:viewportWidth="100"
android:viewportHeight="100">
<path
android:pathData="M22.04,67.14C31.5,72.77 43.73,69.66 49.35,60.2C54.98,50.74 51.87,38.51 42.41,32.88C32.95,27.26 20.72,30.37 15.09,39.83C9.47,49.29 12.58,61.51 22.04,67.14ZM18.82,72.55C31.27,79.95 47.36,75.86 54.76,63.41C62.16,50.97 58.07,34.88 45.62,27.48C33.18,20.08 17.09,24.17 9.69,36.61C2.29,49.06 6.38,65.15 18.82,72.55Z"
android:fillColor="#D4DADE"
android:fillType="evenOdd"/>
<path
android:pathData="M61.7,22.84C63.87,20.71 67.35,20.74 69.48,22.91L72.89,26.37C70.95,28.67 69.78,31.64 69.78,34.89C69.78,42.18 75.68,48.08 82.97,48.08C86.14,48.08 89.05,46.97 91.32,45.11L92.44,46.24C94.57,48.41 94.54,51.89 92.37,54.03L69.04,76.98C66.87,79.11 63.39,79.08 61.25,76.92L38.3,53.58C36.17,51.41 36.2,47.93 38.36,45.8L61.7,22.84Z"
android:fillColor="#D4DADE"
android:fillType="evenOdd"/>
<path
android:pathData="M51.85,67.49C52.83,66.34 53.74,65.1 54.54,63.75C60.56,53.61 58.97,41.06 51.45,32.75L46.96,37.17C52.52,43.49 53.66,52.91 49.13,60.54C48.61,61.41 48.04,62.22 47.42,62.98L51.85,67.49Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
</vector>
18 changes: 18 additions & 0 deletions presentation/src/main/res/drawable/ic_jmt_logo_main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="138dp"
android:height="137dp"
android:viewportWidth="138"
android:viewportHeight="137">
<path
android:pathData="M39.36,87.31C49.76,93.49 63.2,90.08 69.38,79.68C75.56,69.29 72.15,55.85 61.75,49.67C51.36,43.49 37.92,46.9 31.74,57.3C25.55,67.69 28.97,81.13 39.36,87.31ZM35.83,93.25C49.51,101.39 67.19,96.89 75.32,83.22C83.45,69.54 78.96,51.86 65.28,43.73C51.61,35.59 33.93,40.09 25.79,53.76C17.66,67.44 22.16,85.12 35.83,93.25Z"
android:fillColor="#FF531A"
android:fillType="evenOdd"/>
<path
android:pathData="M82.95,38.63C85.33,36.29 89.16,36.32 91.5,38.71L95.25,42.51C93.11,45.04 91.82,48.3 91.82,51.87C91.82,59.88 98.32,66.37 106.32,66.37C109.8,66.37 113,65.14 115.5,63.1L116.72,64.35C119.07,66.73 119.04,70.56 116.65,72.9L91.01,98.12C88.63,100.46 84.8,100.43 82.46,98.05L57.24,72.41C54.89,70.03 54.93,66.2 57.31,63.86L82.95,38.63Z"
android:fillColor="#FF531A"
android:fillType="evenOdd"/>
<path
android:pathData="M72.12,87.69C73.21,86.43 74.2,85.06 75.08,83.59C81.7,72.45 79.95,58.65 71.68,49.52L66.75,54.38C72.87,61.32 74.12,71.67 69.14,80.05C68.57,81.01 67.94,81.91 67.25,82.74L72.12,87.69Z"
android:fillColor="#ffffff"
android:fillType="evenOdd"/>
</vector>
15 changes: 15 additions & 0 deletions presentation/src/main/res/drawable/ic_jmt_logo_title_main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="152dp"
android:height="53dp"
android:viewportWidth="152"
android:viewportHeight="53">
<path
android:pathData="M0,26.42C0,25.89 0.11,25.57 0.32,25.36C0.53,25.2 0.85,25.09 1.39,25.09H18.79V20.82C18.79,20.29 18.89,19.96 19.11,19.75C19.32,19.59 19.64,19.49 20.18,19.49H27.65C28.13,19.49 28.51,19.59 28.72,19.75C28.93,19.96 29.04,20.29 29.04,20.82V25.09H46.44C46.92,25.09 47.29,25.2 47.51,25.36C47.72,25.57 47.83,25.89 47.83,26.42V32.67C47.83,33.2 47.72,33.57 47.51,33.73C47.29,33.95 46.92,34 46.44,34H13.82V38.17C13.82,39.45 14.09,40.41 14.62,40.99C15.16,41.58 16.12,41.85 17.56,41.85C19.48,41.79 21.51,41.74 23.7,41.69C25.83,41.58 28.07,41.42 30.37,41.31C32.61,41.21 34.85,41.05 37.09,40.83C39.34,40.67 41.47,40.46 43.61,40.24C44.09,40.19 44.41,40.24 44.62,40.46C44.78,40.67 44.89,41.04 45,41.58L45.53,47.77C45.58,48.3 45.47,48.62 45.26,48.78C45,48.89 44.62,49 44.14,49.11C41.69,49.32 39.13,49.58 36.46,49.8L28.4,50.28L20.44,50.6C17.83,50.66 15.37,50.71 13.13,50.71C9.71,50.71 7.26,49.8 5.82,47.99C4.32,46.12 3.57,43.18 3.57,39.18V34H1.39C0.85,34 0.53,33.95 0.32,33.74C0.11,33.58 0,33.2 0,32.67V26.43L0,26.42ZM3.04,1.34C3.04,0.8 3.15,0.48 3.36,0.27C3.58,0.11 3.9,0 4.43,0H43.29C43.77,0 44.15,0.11 44.36,0.27C44.57,0.48 44.68,0.8 44.68,1.34V7C44.68,7.53 44.57,7.9 44.36,8.06C44.15,8.27 43.77,8.33 43.29,8.33H31.12C32.35,9.56 34,10.57 36.09,11.37C38.11,12.23 40.52,12.76 43.18,12.92C43.29,12.92 43.4,12.98 43.61,12.98C43.77,13.03 43.93,13.08 44.15,13.19C44.25,13.29 44.41,13.45 44.52,13.67C44.62,13.88 44.68,14.2 44.68,14.58V20.07C44.68,20.5 44.62,20.77 44.52,20.98C44.36,21.19 44.2,21.35 44.04,21.41C43.83,21.51 43.61,21.57 43.45,21.57C43.24,21.62 43.02,21.62 42.92,21.62C40.52,21.57 38.33,21.3 36.35,20.82C34.33,20.4 32.51,19.86 30.91,19.11C29.31,18.47 27.92,17.67 26.75,16.76C25.57,15.91 24.61,15.06 23.92,14.15C23.17,15.06 22.26,15.91 21.09,16.76C19.92,17.67 18.53,18.47 16.93,19.11C15.33,19.86 13.51,20.4 11.53,20.82C9.51,21.3 7.26,21.57 4.91,21.62C4.75,21.62 4.59,21.62 4.43,21.57C4.22,21.57 4,21.51 3.84,21.41C3.63,21.35 3.47,21.2 3.36,20.98C3.2,20.77 3.15,20.5 3.15,20.07V14.58C3.15,14.2 3.21,13.88 3.31,13.67C3.42,13.46 3.53,13.3 3.74,13.19C3.85,13.08 4.01,13.03 4.22,12.98C4.38,12.98 4.54,12.92 4.65,12.92C7.32,12.76 9.66,12.23 11.75,11.37C13.77,10.57 15.43,9.56 16.71,8.33H4.43C3.9,8.33 3.58,8.27 3.36,8.06C3.15,7.9 3.04,7.53 3.04,7V1.34Z"
android:fillColor="#FF531A"/>
<path
android:pathData="M80.28,20.07C80.28,22.32 79.8,23.97 78.84,24.93C77.87,25.95 76.44,26.43 74.51,26.43H57.11C55.19,26.43 53.75,25.95 52.79,24.93C51.83,23.97 51.35,22.32 51.35,20.07V1.34C51.35,0.8 51.45,0.48 51.67,0.27C51.88,0.11 52.2,0 52.74,0H78.89C79.37,0 79.75,0.11 79.96,0.27C80.17,0.48 80.28,0.8 80.28,1.34V20.07V20.07ZM78.78,29.68C79.32,29.68 79.64,29.84 79.85,30.06C79.96,30.32 80.06,30.64 80.06,31.02C80.06,32.35 80.38,33.63 81.08,34.86C81.72,36.14 82.73,37.26 84.02,38.22C85.3,39.24 86.84,40.09 88.71,40.73C90.53,41.37 92.61,41.8 94.96,42.02C95.06,42.02 95.17,42.02 95.38,42.07C95.55,42.07 95.71,42.18 95.92,42.28C96.02,42.39 96.18,42.55 96.29,42.76C96.4,42.97 96.45,43.24 96.45,43.67V49.17C96.45,49.54 96.4,49.86 96.29,50.07C96.13,50.28 95.97,50.44 95.81,50.55C95.6,50.61 95.38,50.66 95.22,50.71H94.69C92.24,50.61 89.94,50.34 87.91,49.81C85.78,49.22 83.91,48.53 82.31,47.78C80.6,46.93 79.16,46.07 77.98,45.11C76.75,44.09 75.79,43.13 75.1,42.17C74.35,43.13 73.44,44.09 72.27,45.11C71.04,46.07 69.6,46.93 68,47.78C66.29,48.53 64.42,49.22 62.4,49.81C60.26,50.34 58.02,50.61 55.56,50.71H55.09C54.87,50.66 54.66,50.61 54.5,50.55C54.29,50.45 54.13,50.29 54.02,50.07C53.86,49.86 53.81,49.54 53.81,49.17V43.67C53.81,43.24 53.86,42.97 53.97,42.76C54.07,42.55 54.18,42.39 54.4,42.28C54.5,42.18 54.66,42.07 54.87,42.07C55.03,42.02 55.2,42.02 55.3,42.02C57.65,41.8 59.73,41.38 61.6,40.73C63.42,40.09 64.96,39.24 66.24,38.22C67.53,37.26 68.49,36.14 69.18,34.86C69.82,33.63 70.2,32.35 70.2,31.02C70.2,30.64 70.25,30.32 70.46,30.06C70.57,29.84 70.94,29.68 71.48,29.68H78.79H78.78ZM68.96,18.05C69.55,18.05 69.98,17.94 70.19,17.67C70.4,17.46 70.51,17.04 70.51,16.34V8.12H61.12V16.34C61.12,17.04 61.22,17.46 61.44,17.67C61.65,17.94 62.03,18.05 62.67,18.05H68.96ZM102.22,16.93C102.22,17.46 102.11,17.83 101.89,17.99C101.68,18.2 101.31,18.26 100.83,18.26H95.92V28.77C95.92,29.31 95.81,29.68 95.6,29.84C95.38,30.05 95.01,30.11 94.53,30.11H87.06C86.53,30.11 86.2,30.05 85.99,29.84C85.78,29.68 85.67,29.31 85.67,28.77V1.34C85.67,0.8 85.78,0.48 85.99,0.27C86.2,0.11 86.53,0 87.06,0H94.53C95.01,0 95.38,0.11 95.6,0.27C95.81,0.48 95.92,0.8 95.92,1.34V9.4H100.83C101.31,9.4 101.68,9.5 101.89,9.66C102.11,9.87 102.22,10.2 102.22,10.73V16.92V16.93Z"
android:fillColor="#FF531A"/>
<path
android:pathData="M127.25,16.5C127.25,17.03 127.15,17.4 126.93,17.56C126.72,17.78 126.34,17.83 125.86,17.83H114.92C114.92,17.99 114.92,18.1 114.98,18.2V18.53C114.98,19.59 115.25,20.29 115.78,20.66C116.26,21.09 117.06,21.25 118.18,21.14C119.3,21.08 120.53,21.03 121.92,20.93C123.2,20.87 124.53,20.71 125.92,20.5C126.4,20.44 126.72,20.5 126.93,20.66C127.1,20.87 127.2,21.25 127.31,21.78L127.84,26.69C127.9,27.22 127.79,27.6 127.57,27.71C127.31,27.87 126.93,27.97 126.45,28.03C124.32,28.35 122.29,28.56 120.32,28.67C118.29,28.83 116.31,28.88 114.28,28.88C110.87,28.88 108.41,27.97 106.97,26.1C105.48,24.29 104.73,21.4 104.73,17.35C104.73,14.89 104.73,12.22 104.78,9.34C104.78,6.46 104.84,3.79 104.94,1.33C104.94,0.8 105.1,0.48 105.32,0.27C105.48,0.11 105.79,0 106.33,0H125.87C126.35,0 126.72,0.11 126.93,0.27C127.15,0.48 127.26,0.8 127.26,1.33V6.24C127.26,6.78 127.15,7.15 126.93,7.31C126.72,7.52 126.35,7.58 125.87,7.58H114.87V10.25H125.87C126.35,10.25 126.72,10.35 126.93,10.51C127.15,10.73 127.26,11.05 127.26,11.58V16.49L127.25,16.5ZM114.87,41.37C114.87,39.77 115.19,38.33 115.83,36.94C116.47,35.61 117.48,34.43 118.87,33.42C120.26,32.46 122.02,31.71 124.21,31.13C126.34,30.59 128.96,30.33 132.06,30.33C135.15,30.33 137.72,30.59 139.9,31.13C142.04,31.71 143.85,32.46 145.24,33.42C146.63,34.44 147.64,35.61 148.29,36.94C148.92,38.33 149.24,39.77 149.24,41.37C149.24,42.98 148.92,44.42 148.29,45.8C147.65,47.14 146.63,48.31 145.24,49.33C143.85,50.29 142.04,51.04 139.9,51.62C137.72,52.15 135.1,52.42 132.06,52.42C129.01,52.42 126.35,52.15 124.21,51.62C122.02,51.03 120.26,50.29 118.87,49.33C117.48,48.31 116.47,47.14 115.83,45.8C115.19,44.42 114.87,42.98 114.87,41.37ZM139.15,41.37C139.15,40.84 138.94,40.36 138.57,39.93C138.14,39.56 137.66,39.24 137.02,38.97C136.32,38.76 135.57,38.55 134.72,38.44C133.87,38.33 132.96,38.28 132.06,38.28C131.1,38.28 130.24,38.33 129.39,38.44C128.53,38.55 127.79,38.76 127.14,38.97C126.45,39.24 125.92,39.56 125.54,39.93C125.12,40.36 124.96,40.84 124.96,41.37C124.96,41.91 125.12,42.39 125.54,42.81C125.92,43.18 126.45,43.51 127.14,43.77C127.78,43.98 128.53,44.2 129.39,44.31C130.24,44.41 131.1,44.47 132.06,44.47C132.96,44.47 133.87,44.41 134.72,44.31C135.57,44.2 136.32,43.98 137.02,43.77C137.66,43.51 138.14,43.18 138.57,42.81C138.94,42.38 139.15,41.91 139.15,41.37ZM131.63,28.51C131.1,28.51 130.77,28.46 130.56,28.24C130.35,28.08 130.24,27.71 130.24,27.18V1.34C130.24,0.8 130.35,0.48 130.56,0.27C130.77,0.11 131.1,0 131.63,0H138.3C138.78,0 139.15,0.11 139.37,0.27C139.58,0.48 139.69,0.8 139.69,1.34V10.2H142.04V1.34C142.04,0.8 142.14,0.48 142.36,0.27C142.57,0.11 142.89,0 143.43,0H150.1C150.58,0 150.95,0.11 151.16,0.27C151.38,0.48 151.49,0.8 151.49,1.34V27.44C151.49,27.97 151.38,28.35 151.16,28.51C150.95,28.72 150.57,28.77 150.1,28.77H143.43C142.89,28.77 142.57,28.72 142.36,28.51C142.15,28.35 142.04,27.97 142.04,27.44V18.31H139.69V27.17C139.69,27.71 139.58,28.08 139.37,28.24C139.15,28.45 138.78,28.51 138.3,28.51H131.63V28.51Z"
android:fillColor="#FF531A"/>
</vector>
Loading

0 comments on commit 314bbce

Please sign in to comment.