diff --git a/.github/workflows/android-cd.yml b/.github/workflows/android-cd.yml index 3c87d42e1..ff40666dc 100644 --- a/.github/workflows/android-cd.yml +++ b/.github/workflows/android-cd.yml @@ -87,6 +87,6 @@ jobs: # uses: r0adkll/upload-google-play@v1 # with: # serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }} -# packageName: com.woowacourse.staccato +# packageName: com.on.staccato # releaseFiles: android/Staccato_AN/app/build/outputs/bundle/release/app-release.aab # track: internal diff --git a/.github/workflows/backend-ci-cd-dev.yml b/.github/workflows/backend-ci-cd-dev.yml index a8fa76037..c92e4f4cb 100644 --- a/.github/workflows/backend-ci-cd-dev.yml +++ b/.github/workflows/backend-ci-cd-dev.yml @@ -2,7 +2,7 @@ name: Backend CI/CD dev on: pull_request: - branches: [ "develop-be" ] + branches: [ "develop-be", "develop" ] jobs: ci: diff --git a/.github/workflows/backend-ci-cd-stage.yml b/.github/workflows/backend-ci-cd-stage.yml index 12e134329..70c341f41 100644 --- a/.github/workflows/backend-ci-cd-stage.yml +++ b/.github/workflows/backend-ci-cd-stage.yml @@ -2,7 +2,7 @@ name: Backend CI/CD stage on: push: - branches: [ "develop-be" ] + branches: [ "develop-be", "develop" ] jobs: ci: diff --git a/android/Staccato_AN/app/build.gradle.kts b/android/Staccato_AN/app/build.gradle.kts index 702c54303..b95747432 100644 --- a/android/Staccato_AN/app/build.gradle.kts +++ b/android/Staccato_AN/app/build.gradle.kts @@ -22,15 +22,15 @@ plugins { } android { - namespace = "com.woowacourse.staccato" + namespace = "com.on.staccato" compileSdk = 34 defaultConfig { - applicationId = "com.woowacourse.staccato" + applicationId = "com.on.staccato" minSdk = 26 targetSdk = 34 - versionCode = 2 - versionName = "1.1" + versionCode = 3 + versionName = "1.0.0" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" diff --git a/android/Staccato_AN/app/src/androidTest/java/com/woowacourse/staccato/ExampleInstrumentedTest.kt b/android/Staccato_AN/app/src/androidTest/java/com/on/staccato/ExampleInstrumentedTest.kt similarity index 84% rename from android/Staccato_AN/app/src/androidTest/java/com/woowacourse/staccato/ExampleInstrumentedTest.kt rename to android/Staccato_AN/app/src/androidTest/java/com/on/staccato/ExampleInstrumentedTest.kt index 998888761..e050a1a54 100644 --- a/android/Staccato_AN/app/src/androidTest/java/com/woowacourse/staccato/ExampleInstrumentedTest.kt +++ b/android/Staccato_AN/app/src/androidTest/java/com/on/staccato/ExampleInstrumentedTest.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato +package com.on.staccato import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.platform.app.InstrumentationRegistry @@ -17,6 +17,6 @@ class ExampleInstrumentedTest { fun useAppContext() { // Context of the app under test. val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("com.woowacourse.staccato", appContext.packageName) + assertEquals("com.on.staccato", appContext.packageName) } } diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/StaccatoApplication.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/StaccatoApplication.kt similarity index 82% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/StaccatoApplication.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/StaccatoApplication.kt index 5c60df9bb..91cabaf3f 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/StaccatoApplication.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/StaccatoApplication.kt @@ -1,8 +1,8 @@ -package com.woowacourse.staccato +package com.on.staccato import android.app.Application import androidx.appcompat.app.AppCompatDelegate -import com.woowacourse.staccato.data.UserInfoPreferencesManager +import com.on.staccato.data.UserInfoPreferencesManager class StaccatoApplication : Application() { override fun onCreate() { diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/ApiResponseHandler.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/ApiResponseHandler.kt similarity index 91% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/ApiResponseHandler.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/ApiResponseHandler.kt index 0910ec6e7..3c268f59c 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/ApiResponseHandler.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/ApiResponseHandler.kt @@ -1,8 +1,8 @@ -package com.woowacourse.staccato.data +package com.on.staccato.data -import com.woowacourse.staccato.data.StaccatoClient.getErrorResponse -import com.woowacourse.staccato.data.dto.ErrorResponse -import com.woowacourse.staccato.data.dto.Status +import com.on.staccato.data.StaccatoClient.getErrorResponse +import com.on.staccato.data.dto.ErrorResponse +import com.on.staccato.data.dto.Status import okhttp3.ResponseBody import retrofit2.HttpException import retrofit2.Response diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/HeaderInterceptor.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/HeaderInterceptor.kt similarity index 95% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/HeaderInterceptor.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/HeaderInterceptor.kt index b5169825b..0d7537f84 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/HeaderInterceptor.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/HeaderInterceptor.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data +package com.on.staccato.data import kotlinx.coroutines.runBlocking import okhttp3.Interceptor diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/ResponseResult.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/ResponseResult.kt similarity index 77% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/ResponseResult.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/ResponseResult.kt index f8e3624b1..e8d30eb87 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/ResponseResult.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/ResponseResult.kt @@ -1,6 +1,6 @@ -package com.woowacourse.staccato.data +package com.on.staccato.data -import com.woowacourse.staccato.data.dto.Status +import com.on.staccato.data.dto.Status sealed interface ResponseResult { class Success(val data: T) : ResponseResult diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/StaccatoClient.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/StaccatoClient.kt similarity index 81% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/StaccatoClient.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/StaccatoClient.kt index 428bd29d9..e6a34290c 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/StaccatoClient.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/StaccatoClient.kt @@ -1,14 +1,14 @@ -package com.woowacourse.staccato.data +package com.on.staccato.data import com.jakewharton.retrofit2.converter.kotlinx.serialization.asConverterFactory -import com.woowacourse.staccato.BuildConfig -import com.woowacourse.staccato.data.comment.CommentApiService -import com.woowacourse.staccato.data.dto.ErrorResponse -import com.woowacourse.staccato.data.image.ImageApiService -import com.woowacourse.staccato.data.login.LoginApiService -import com.woowacourse.staccato.data.memory.MemoryApiService -import com.woowacourse.staccato.data.moment.MomentApiService -import com.woowacourse.staccato.data.timeline.TimeLineApiService +import com.on.staccato.BuildConfig +import com.on.staccato.data.comment.CommentApiService +import com.on.staccato.data.dto.ErrorResponse +import com.on.staccato.data.image.ImageApiService +import com.on.staccato.data.login.LoginApiService +import com.on.staccato.data.memory.MemoryApiService +import com.on.staccato.data.moment.MomentApiService +import com.on.staccato.data.timeline.TimeLineApiService import kotlinx.serialization.json.Json import okhttp3.MediaType.Companion.toMediaType import okhttp3.OkHttpClient diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/TokenManager.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/TokenManager.kt similarity index 87% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/TokenManager.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/TokenManager.kt index a6ba0ca5c..18e82afeb 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/TokenManager.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/TokenManager.kt @@ -1,6 +1,6 @@ -package com.woowacourse.staccato.data +package com.on.staccato.data -import com.woowacourse.staccato.StaccatoApplication +import com.on.staccato.StaccatoApplication import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/UserInfoPreferencesManager.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/UserInfoPreferencesManager.kt similarity index 77% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/UserInfoPreferencesManager.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/UserInfoPreferencesManager.kt index 25c0c431b..28b061208 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/UserInfoPreferencesManager.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/UserInfoPreferencesManager.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data +package com.on.staccato.data import android.content.Context import android.content.SharedPreferences @@ -22,7 +22,7 @@ class UserInfoPreferencesManager(context: Context) { } companion object { - private const val USER_INFO_PREF_NAME = "com.woowacourse.staccato.user_info_prefs" - private const val TOKEN_KEY_NAME = "com.woowacourse.staccato.token" + private const val USER_INFO_PREF_NAME = "com.on.staccato.user_info_prefs" + private const val TOKEN_KEY_NAME = "com.on.staccato.token" } } diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/comment/CommentApiService.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/comment/CommentApiService.kt similarity index 80% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/comment/CommentApiService.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/comment/CommentApiService.kt index b30638f22..bc04c15cb 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/comment/CommentApiService.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/comment/CommentApiService.kt @@ -1,8 +1,8 @@ -package com.woowacourse.staccato.data.comment +package com.on.staccato.data.comment -import com.woowacourse.staccato.data.dto.comment.CommentRequest -import com.woowacourse.staccato.data.dto.comment.CommentUpdateRequest -import com.woowacourse.staccato.data.dto.comment.CommentsResponse +import com.on.staccato.data.dto.comment.CommentRequest +import com.on.staccato.data.dto.comment.CommentUpdateRequest +import com.on.staccato.data.dto.comment.CommentsResponse import retrofit2.Response import retrofit2.http.Body import retrofit2.http.DELETE diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/comment/CommentDataSource.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/comment/CommentDataSource.kt similarity index 57% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/comment/CommentDataSource.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/comment/CommentDataSource.kt index 8b313e135..2dc715d1c 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/comment/CommentDataSource.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/comment/CommentDataSource.kt @@ -1,9 +1,9 @@ -package com.woowacourse.staccato.data.comment +package com.on.staccato.data.comment -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.data.dto.comment.CommentRequest -import com.woowacourse.staccato.data.dto.comment.CommentUpdateRequest -import com.woowacourse.staccato.data.dto.comment.CommentsResponse +import com.on.staccato.data.ResponseResult +import com.on.staccato.data.dto.comment.CommentRequest +import com.on.staccato.data.dto.comment.CommentUpdateRequest +import com.on.staccato.data.dto.comment.CommentsResponse interface CommentDataSource { suspend fun getComments(momentId: Long): ResponseResult diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/comment/CommentDefaultRepository.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/comment/CommentDefaultRepository.kt similarity index 85% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/comment/CommentDefaultRepository.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/comment/CommentDefaultRepository.kt index 4c091536c..2ef22f9eb 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/comment/CommentDefaultRepository.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/comment/CommentDefaultRepository.kt @@ -1,12 +1,12 @@ -package com.woowacourse.staccato.data.comment +package com.on.staccato.data.comment -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.data.dto.comment.CommentUpdateRequest -import com.woowacourse.staccato.data.dto.mapper.toDomain -import com.woowacourse.staccato.data.dto.mapper.toDto -import com.woowacourse.staccato.domain.model.Comment -import com.woowacourse.staccato.domain.model.NewComment -import com.woowacourse.staccato.domain.repository.CommentRepository +import com.on.staccato.data.ResponseResult +import com.on.staccato.data.dto.comment.CommentUpdateRequest +import com.on.staccato.data.dto.mapper.toDomain +import com.on.staccato.data.dto.mapper.toDto +import com.on.staccato.domain.model.Comment +import com.on.staccato.domain.model.NewComment +import com.on.staccato.domain.repository.CommentRepository class CommentDefaultRepository( private val commentDataSource: CommentDataSource = CommentRemoteDataSource(), diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/comment/CommentRemoteDataSource.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/comment/CommentRemoteDataSource.kt similarity index 68% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/comment/CommentRemoteDataSource.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/comment/CommentRemoteDataSource.kt index 161f6f77f..5deb481b3 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/comment/CommentRemoteDataSource.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/comment/CommentRemoteDataSource.kt @@ -1,11 +1,11 @@ -package com.woowacourse.staccato.data.comment +package com.on.staccato.data.comment -import com.woowacourse.staccato.data.ApiResponseHandler.handleApiResponse -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.data.StaccatoClient -import com.woowacourse.staccato.data.dto.comment.CommentRequest -import com.woowacourse.staccato.data.dto.comment.CommentUpdateRequest -import com.woowacourse.staccato.data.dto.comment.CommentsResponse +import com.on.staccato.data.ApiResponseHandler.handleApiResponse +import com.on.staccato.data.ResponseResult +import com.on.staccato.data.StaccatoClient +import com.on.staccato.data.dto.comment.CommentRequest +import com.on.staccato.data.dto.comment.CommentUpdateRequest +import com.on.staccato.data.dto.comment.CommentsResponse class CommentRemoteDataSource( private val commentApiService: CommentApiService = StaccatoClient.commentApiService, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/ErrorResponse.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/ErrorResponse.kt similarity index 76% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/ErrorResponse.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/ErrorResponse.kt index ca79ccf5f..6e76c586d 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/ErrorResponse.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/ErrorResponse.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto +package com.on.staccato.data.dto import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/Status.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/Status.kt similarity index 75% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/Status.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/Status.kt index 96b635d05..0c3551785 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/Status.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/Status.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto +package com.on.staccato.data.dto sealed class Status { data class Code(val code: Int) : Status() diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/comment/CommentDto.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/comment/CommentDto.kt similarity index 88% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/comment/CommentDto.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/comment/CommentDto.kt index fc5b5d25a..96645af91 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/comment/CommentDto.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/comment/CommentDto.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.comment +package com.on.staccato.data.dto.comment import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/comment/CommentRequest.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/comment/CommentRequest.kt similarity index 81% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/comment/CommentRequest.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/comment/CommentRequest.kt index aaf064b5f..239fd3f49 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/comment/CommentRequest.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/comment/CommentRequest.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.comment +package com.on.staccato.data.dto.comment import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/comment/CommentUpdateRequest.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/comment/CommentUpdateRequest.kt similarity index 71% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/comment/CommentUpdateRequest.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/comment/CommentUpdateRequest.kt index 34b225bd4..e89e54f19 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/comment/CommentUpdateRequest.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/comment/CommentUpdateRequest.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.comment +package com.on.staccato.data.dto.comment import kotlinx.serialization.SerialName diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/comment/CommentsResponse.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/comment/CommentsResponse.kt similarity index 79% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/comment/CommentsResponse.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/comment/CommentsResponse.kt index 2b800ffbb..f6503b5f5 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/comment/CommentsResponse.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/comment/CommentsResponse.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.comment +package com.on.staccato.data.dto.comment import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/image/ImageResponse.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/image/ImageResponse.kt similarity index 78% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/image/ImageResponse.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/image/ImageResponse.kt index e40014283..6716049eb 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/image/ImageResponse.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/image/ImageResponse.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.image +package com.on.staccato.data.dto.image import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/login/NicknameLoginRequest.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/login/NicknameLoginRequest.kt similarity index 79% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/login/NicknameLoginRequest.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/login/NicknameLoginRequest.kt index 450c07b4d..c92e9bec0 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/login/NicknameLoginRequest.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/login/NicknameLoginRequest.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.login +package com.on.staccato.data.dto.login import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/login/NicknameLoginResponse.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/login/NicknameLoginResponse.kt similarity index 78% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/login/NicknameLoginResponse.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/login/NicknameLoginResponse.kt index 551274b5b..e280bca08 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/login/NicknameLoginResponse.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/login/NicknameLoginResponse.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.login +package com.on.staccato.data.dto.login import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/mapper/CommentMapper.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/mapper/CommentMapper.kt similarity index 54% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/mapper/CommentMapper.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/mapper/CommentMapper.kt index 8520dd82a..a27b33fee 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/mapper/CommentMapper.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/mapper/CommentMapper.kt @@ -1,10 +1,10 @@ -package com.woowacourse.staccato.data.dto.mapper +package com.on.staccato.data.dto.mapper -import com.woowacourse.staccato.data.dto.comment.CommentDto -import com.woowacourse.staccato.data.dto.comment.CommentRequest -import com.woowacourse.staccato.data.dto.comment.CommentsResponse -import com.woowacourse.staccato.domain.model.Comment -import com.woowacourse.staccato.domain.model.NewComment +import com.on.staccato.data.dto.comment.CommentDto +import com.on.staccato.data.dto.comment.CommentRequest +import com.on.staccato.data.dto.comment.CommentsResponse +import com.on.staccato.domain.model.Comment +import com.on.staccato.domain.model.NewComment fun CommentsResponse.toDomain(): List = comments.map { it.toDomain() } diff --git a/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/mapper/FeelingMapper.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/mapper/FeelingMapper.kt new file mode 100644 index 000000000..b7f2c87b2 --- /dev/null +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/mapper/FeelingMapper.kt @@ -0,0 +1,9 @@ +package com.on.staccato.data.dto.mapper + +import com.on.staccato.data.dto.moment.FeelingRequest +import com.on.staccato.domain.model.Feeling + +fun Feeling.toFeelingRequest(): FeelingRequest = + FeelingRequest( + feeling = value, + ) diff --git a/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/mapper/MemberMapper.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/mapper/MemberMapper.kt new file mode 100644 index 000000000..d1298f8b1 --- /dev/null +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/mapper/MemberMapper.kt @@ -0,0 +1,11 @@ +package com.on.staccato.data.dto.mapper + +import com.on.staccato.data.dto.member.MemberDto +import com.on.staccato.domain.model.Member + +fun MemberDto.toDomain() = + Member( + memberId = memberId, + nickname = nickname, + memberImage = memberImage, + ) diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/mapper/MemoryMapper.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/mapper/MemoryMapper.kt similarity index 65% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/mapper/MemoryMapper.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/mapper/MemoryMapper.kt index fb0293f72..0fed56a7f 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/mapper/MemoryMapper.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/mapper/MemoryMapper.kt @@ -1,14 +1,14 @@ -package com.woowacourse.staccato.data.dto.mapper +package com.on.staccato.data.dto.mapper -import com.woowacourse.staccato.data.dto.memory.MemoriesResponse -import com.woowacourse.staccato.data.dto.memory.MemoryMomentDto -import com.woowacourse.staccato.data.dto.memory.MemoryRequest -import com.woowacourse.staccato.data.dto.memory.MemoryResponse -import com.woowacourse.staccato.domain.model.Memory -import com.woowacourse.staccato.domain.model.MemoryCandidate -import com.woowacourse.staccato.domain.model.MemoryCandidates -import com.woowacourse.staccato.domain.model.MemoryMoment -import com.woowacourse.staccato.domain.model.NewMemory +import com.on.staccato.data.dto.memory.MemoriesResponse +import com.on.staccato.data.dto.memory.MemoryMomentDto +import com.on.staccato.data.dto.memory.MemoryRequest +import com.on.staccato.data.dto.memory.MemoryResponse +import com.on.staccato.domain.model.Memory +import com.on.staccato.domain.model.MemoryCandidate +import com.on.staccato.domain.model.MemoryCandidates +import com.on.staccato.domain.model.MemoryMoment +import com.on.staccato.domain.model.NewMemory import java.time.LocalDate import java.time.LocalDateTime diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/mapper/MomentMapper.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/mapper/MomentMapper.kt similarity index 62% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/mapper/MomentMapper.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/mapper/MomentMapper.kt index 4626157a1..fa8d96207 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/mapper/MomentMapper.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/mapper/MomentMapper.kt @@ -1,10 +1,10 @@ -package com.woowacourse.staccato.data.dto.mapper +package com.on.staccato.data.dto.mapper -import com.woowacourse.staccato.data.dto.moment.MomentLocationDto -import com.woowacourse.staccato.data.dto.moment.MomentResponse -import com.woowacourse.staccato.domain.model.Feeling -import com.woowacourse.staccato.domain.model.Moment -import com.woowacourse.staccato.domain.model.MomentLocation +import com.on.staccato.data.dto.moment.MomentLocationDto +import com.on.staccato.data.dto.moment.MomentResponse +import com.on.staccato.domain.model.Feeling +import com.on.staccato.domain.model.Moment +import com.on.staccato.domain.model.MomentLocation import java.time.LocalDateTime fun MomentResponse.toDomain() = diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/mapper/TimelineMapper.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/mapper/TimelineMapper.kt similarity index 66% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/mapper/TimelineMapper.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/mapper/TimelineMapper.kt index dc872145b..4f8e2d907 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/mapper/TimelineMapper.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/mapper/TimelineMapper.kt @@ -1,9 +1,9 @@ -package com.woowacourse.staccato.data.dto.mapper +package com.on.staccato.data.dto.mapper -import com.woowacourse.staccato.data.dto.timeline.TimelineMemoryDto -import com.woowacourse.staccato.data.dto.timeline.TimelineResponse -import com.woowacourse.staccato.domain.model.Memory -import com.woowacourse.staccato.domain.model.Timeline +import com.on.staccato.data.dto.timeline.TimelineMemoryDto +import com.on.staccato.data.dto.timeline.TimelineResponse +import com.on.staccato.domain.model.Memory +import com.on.staccato.domain.model.Timeline import java.time.LocalDate fun TimelineResponse.toDomain(): Timeline { diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/member/MemberDto.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/member/MemberDto.kt similarity index 85% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/member/MemberDto.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/member/MemberDto.kt index 7e372f7ba..2c4e3514f 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/member/MemberDto.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/member/MemberDto.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.member +package com.on.staccato.data.dto.member import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/memory/MemoriesResponse.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/memory/MemoriesResponse.kt similarity index 87% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/memory/MemoriesResponse.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/memory/MemoriesResponse.kt index cef8a85c4..5378ad231 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/memory/MemoriesResponse.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/memory/MemoriesResponse.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.memory +package com.on.staccato.data.dto.memory import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/memory/MemoryCreationResponse.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/memory/MemoryCreationResponse.kt similarity index 78% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/memory/MemoryCreationResponse.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/memory/MemoryCreationResponse.kt index 3753654a5..980d71054 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/memory/MemoryCreationResponse.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/memory/MemoryCreationResponse.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.memory +package com.on.staccato.data.dto.memory import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/memory/MemoryMomentDto.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/memory/MemoryMomentDto.kt similarity index 87% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/memory/MemoryMomentDto.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/memory/MemoryMomentDto.kt index ce8cc4e25..f29d71800 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/memory/MemoryMomentDto.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/memory/MemoryMomentDto.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.memory +package com.on.staccato.data.dto.memory import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/memory/MemoryRequest.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/memory/MemoryRequest.kt similarity index 89% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/memory/MemoryRequest.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/memory/MemoryRequest.kt index 7cd627686..32ab681bb 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/memory/MemoryRequest.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/memory/MemoryRequest.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.memory +package com.on.staccato.data.dto.memory import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/memory/MemoryResponse.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/memory/MemoryResponse.kt similarity index 84% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/memory/MemoryResponse.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/memory/MemoryResponse.kt index dba9f11ad..6f70a8a79 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/memory/MemoryResponse.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/memory/MemoryResponse.kt @@ -1,6 +1,6 @@ -package com.woowacourse.staccato.data.dto.memory +package com.on.staccato.data.dto.memory -import com.woowacourse.staccato.data.dto.member.MemberDto +import com.on.staccato.data.dto.member.MemberDto import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/FeelingRequest.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/FeelingRequest.kt similarity index 78% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/FeelingRequest.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/FeelingRequest.kt index ffecd61fe..dc1f9d605 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/FeelingRequest.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/FeelingRequest.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.moment +package com.on.staccato.data.dto.moment import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/MomentCreationRequest.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/MomentCreationRequest.kt similarity index 91% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/MomentCreationRequest.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/MomentCreationRequest.kt index 8f3f6b316..5bd04f730 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/MomentCreationRequest.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/MomentCreationRequest.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.moment +package com.on.staccato.data.dto.moment import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/MomentCreationResponse.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/MomentCreationResponse.kt similarity index 78% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/MomentCreationResponse.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/MomentCreationResponse.kt index 0c57084b3..f912fef3e 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/MomentCreationResponse.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/MomentCreationResponse.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.moment +package com.on.staccato.data.dto.moment import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/MomentLocationDto.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/MomentLocationDto.kt similarity index 85% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/MomentLocationDto.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/MomentLocationDto.kt index b4b1081b6..d88afbcdc 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/MomentLocationDto.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/MomentLocationDto.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.moment +package com.on.staccato.data.dto.moment import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/MomentLocationResponse.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/MomentLocationResponse.kt similarity index 82% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/MomentLocationResponse.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/MomentLocationResponse.kt index 4410dec49..ea96475d0 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/MomentLocationResponse.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/MomentLocationResponse.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.moment +package com.on.staccato.data.dto.moment import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/MomentResponse.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/MomentResponse.kt similarity index 84% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/MomentResponse.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/MomentResponse.kt index ecafde2cb..b639c195d 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/MomentResponse.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/MomentResponse.kt @@ -1,6 +1,6 @@ -package com.woowacourse.staccato.data.dto.moment +package com.on.staccato.data.dto.moment -import com.woowacourse.staccato.data.dto.comment.CommentDto +import com.on.staccato.data.dto.comment.CommentDto import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/MomentUpdateRequest.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/MomentUpdateRequest.kt similarity index 83% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/MomentUpdateRequest.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/MomentUpdateRequest.kt index 7a56e398f..a106d279a 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/moment/MomentUpdateRequest.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/moment/MomentUpdateRequest.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.moment +package com.on.staccato.data.dto.moment import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/timeline/TimelineMemberDto.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/timeline/TimelineMemberDto.kt similarity index 82% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/timeline/TimelineMemberDto.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/timeline/TimelineMemberDto.kt index 0c1f84fbe..d5fcd6901 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/timeline/TimelineMemberDto.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/timeline/TimelineMemberDto.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.timeline +package com.on.staccato.data.dto.timeline import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/timeline/TimelineMemoryDto.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/timeline/TimelineMemoryDto.kt similarity index 90% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/timeline/TimelineMemoryDto.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/timeline/TimelineMemoryDto.kt index 3585a614c..0c64759a2 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/timeline/TimelineMemoryDto.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/timeline/TimelineMemoryDto.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.timeline +package com.on.staccato.data.dto.timeline import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/timeline/TimelineResponse.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/timeline/TimelineResponse.kt similarity index 79% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/timeline/TimelineResponse.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/timeline/TimelineResponse.kt index 372fe13d4..b7eaf5af0 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/timeline/TimelineResponse.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/dto/timeline/TimelineResponse.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.data.dto.timeline +package com.on.staccato.data.dto.timeline import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/image/ImageApiService.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/image/ImageApiService.kt similarity index 78% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/image/ImageApiService.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/image/ImageApiService.kt index 6eb1c3584..9b7b83d10 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/image/ImageApiService.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/image/ImageApiService.kt @@ -1,6 +1,6 @@ -package com.woowacourse.staccato.data.image +package com.on.staccato.data.image -import com.woowacourse.staccato.data.dto.image.ImageResponse +import com.on.staccato.data.dto.image.ImageResponse import okhttp3.MultipartBody import retrofit2.Response import retrofit2.http.Multipart diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/image/ImageDefaultRepository.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/image/ImageDefaultRepository.kt similarity index 74% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/image/ImageDefaultRepository.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/image/ImageDefaultRepository.kt index 2a4e8c9a7..a4d4a265c 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/image/ImageDefaultRepository.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/image/ImageDefaultRepository.kt @@ -1,9 +1,9 @@ -package com.woowacourse.staccato.data.image +package com.on.staccato.data.image -import com.woowacourse.staccato.data.ApiResponseHandler.handleApiResponse -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.data.dto.image.ImageResponse -import com.woowacourse.staccato.domain.repository.ImageRepository +import com.on.staccato.data.ApiResponseHandler.handleApiResponse +import com.on.staccato.data.ResponseResult +import com.on.staccato.data.dto.image.ImageResponse +import com.on.staccato.domain.repository.ImageRepository import okhttp3.MultipartBody class ImageDefaultRepository( diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/login/LoginApiService.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/login/LoginApiService.kt similarity index 59% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/login/LoginApiService.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/login/LoginApiService.kt index e5e7f4fd2..db333f305 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/login/LoginApiService.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/login/LoginApiService.kt @@ -1,7 +1,7 @@ -package com.woowacourse.staccato.data.login +package com.on.staccato.data.login -import com.woowacourse.staccato.data.dto.login.NicknameLoginRequest -import com.woowacourse.staccato.data.dto.login.NicknameLoginResponse +import com.on.staccato.data.dto.login.NicknameLoginRequest +import com.on.staccato.data.dto.login.NicknameLoginResponse import retrofit2.Response import retrofit2.http.Body import retrofit2.http.POST diff --git a/android/Staccato_AN/app/src/main/java/com/on/staccato/data/login/LoginDataSource.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/login/LoginDataSource.kt new file mode 100644 index 000000000..484a1781e --- /dev/null +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/login/LoginDataSource.kt @@ -0,0 +1,8 @@ +package com.on.staccato.data.login + +import com.on.staccato.data.ResponseResult +import com.on.staccato.data.dto.login.NicknameLoginResponse + +interface LoginDataSource { + suspend fun requestLoginWithNickname(nickname: String): ResponseResult +} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/login/LoginDefaultRepository.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/login/LoginDefaultRepository.kt similarity index 82% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/login/LoginDefaultRepository.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/login/LoginDefaultRepository.kt index 4497978f1..c73e47e87 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/login/LoginDefaultRepository.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/login/LoginDefaultRepository.kt @@ -1,7 +1,7 @@ -package com.woowacourse.staccato.data.login +package com.on.staccato.data.login -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.domain.repository.LoginRepository +import com.on.staccato.data.ResponseResult +import com.on.staccato.domain.repository.LoginRepository class LoginDefaultRepository( private val loginDataSource: LoginDataSource = LoginRemoteDataSource(), diff --git a/android/Staccato_AN/app/src/main/java/com/on/staccato/data/login/LoginRemoteDataSource.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/login/LoginRemoteDataSource.kt new file mode 100644 index 000000000..00c650d61 --- /dev/null +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/login/LoginRemoteDataSource.kt @@ -0,0 +1,14 @@ +package com.on.staccato.data.login + +import com.on.staccato.data.ApiResponseHandler.handleApiResponse +import com.on.staccato.data.ResponseResult +import com.on.staccato.data.StaccatoClient +import com.on.staccato.data.dto.login.NicknameLoginRequest +import com.on.staccato.data.dto.login.NicknameLoginResponse + +class LoginRemoteDataSource( + private val loginApiService: LoginApiService = StaccatoClient.loginApiService, +) : LoginDataSource { + override suspend fun requestLoginWithNickname(nickname: String): ResponseResult = + handleApiResponse { loginApiService.postNicknameLogin(NicknameLoginRequest(nickname)) } +} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/memory/MemoryApiService.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/memory/MemoryApiService.kt similarity index 81% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/memory/MemoryApiService.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/memory/MemoryApiService.kt index 17c001acd..62eafa632 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/memory/MemoryApiService.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/memory/MemoryApiService.kt @@ -1,9 +1,9 @@ -package com.woowacourse.staccato.data.memory +package com.on.staccato.data.memory -import com.woowacourse.staccato.data.dto.memory.MemoriesResponse -import com.woowacourse.staccato.data.dto.memory.MemoryCreationResponse -import com.woowacourse.staccato.data.dto.memory.MemoryRequest -import com.woowacourse.staccato.data.dto.memory.MemoryResponse +import com.on.staccato.data.dto.memory.MemoriesResponse +import com.on.staccato.data.dto.memory.MemoryCreationResponse +import com.on.staccato.data.dto.memory.MemoryRequest +import com.on.staccato.data.dto.memory.MemoryResponse import retrofit2.Response import retrofit2.http.Body import retrofit2.http.DELETE diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/memory/MemoryDataSource.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/memory/MemoryDataSource.kt similarity index 56% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/memory/MemoryDataSource.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/memory/MemoryDataSource.kt index 880307960..9898deeff 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/memory/MemoryDataSource.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/memory/MemoryDataSource.kt @@ -1,10 +1,10 @@ -package com.woowacourse.staccato.data.memory +package com.on.staccato.data.memory -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.data.dto.memory.MemoriesResponse -import com.woowacourse.staccato.data.dto.memory.MemoryCreationResponse -import com.woowacourse.staccato.data.dto.memory.MemoryResponse -import com.woowacourse.staccato.domain.model.NewMemory +import com.on.staccato.data.ResponseResult +import com.on.staccato.data.dto.memory.MemoriesResponse +import com.on.staccato.data.dto.memory.MemoryCreationResponse +import com.on.staccato.data.dto.memory.MemoryResponse +import com.on.staccato.domain.model.NewMemory interface MemoryDataSource { suspend fun getMemory(memoryId: Long): ResponseResult diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/memory/MemoryDefaultRepository.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/memory/MemoryDefaultRepository.kt similarity index 87% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/memory/MemoryDefaultRepository.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/memory/MemoryDefaultRepository.kt index 2169fc6f3..582c08cb6 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/memory/MemoryDefaultRepository.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/memory/MemoryDefaultRepository.kt @@ -1,12 +1,12 @@ -package com.woowacourse.staccato.data.memory +package com.on.staccato.data.memory -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.data.dto.mapper.toDomain -import com.woowacourse.staccato.data.dto.memory.MemoryCreationResponse -import com.woowacourse.staccato.domain.model.Memory -import com.woowacourse.staccato.domain.model.MemoryCandidates -import com.woowacourse.staccato.domain.model.NewMemory -import com.woowacourse.staccato.domain.repository.MemoryRepository +import com.on.staccato.data.ResponseResult +import com.on.staccato.data.dto.mapper.toDomain +import com.on.staccato.data.dto.memory.MemoryCreationResponse +import com.on.staccato.domain.model.Memory +import com.on.staccato.domain.model.MemoryCandidates +import com.on.staccato.domain.model.NewMemory +import com.on.staccato.domain.repository.MemoryRepository class MemoryDefaultRepository( private val memoryDataSource: MemoryDataSource, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/memory/MemoryRemoteDataSource.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/memory/MemoryRemoteDataSource.kt similarity index 67% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/memory/MemoryRemoteDataSource.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/memory/MemoryRemoteDataSource.kt index ffc394e6e..8ff154d5b 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/memory/MemoryRemoteDataSource.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/memory/MemoryRemoteDataSource.kt @@ -1,12 +1,12 @@ -package com.woowacourse.staccato.data.memory +package com.on.staccato.data.memory -import com.woowacourse.staccato.data.ApiResponseHandler.handleApiResponse -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.data.dto.mapper.toDto -import com.woowacourse.staccato.data.dto.memory.MemoriesResponse -import com.woowacourse.staccato.data.dto.memory.MemoryCreationResponse -import com.woowacourse.staccato.data.dto.memory.MemoryResponse -import com.woowacourse.staccato.domain.model.NewMemory +import com.on.staccato.data.ApiResponseHandler.handleApiResponse +import com.on.staccato.data.ResponseResult +import com.on.staccato.data.dto.mapper.toDto +import com.on.staccato.data.dto.memory.MemoriesResponse +import com.on.staccato.data.dto.memory.MemoryCreationResponse +import com.on.staccato.data.dto.memory.MemoryResponse +import com.on.staccato.domain.model.NewMemory class MemoryRemoteDataSource( private val memoryApiService: MemoryApiService, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/moment/MomentApiService.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/moment/MomentApiService.kt similarity index 74% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/moment/MomentApiService.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/moment/MomentApiService.kt index ae9a98ddb..ab4b1c55a 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/moment/MomentApiService.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/moment/MomentApiService.kt @@ -1,11 +1,11 @@ -package com.woowacourse.staccato.data.moment - -import com.woowacourse.staccato.data.dto.moment.FeelingRequest -import com.woowacourse.staccato.data.dto.moment.MomentCreationRequest -import com.woowacourse.staccato.data.dto.moment.MomentCreationResponse -import com.woowacourse.staccato.data.dto.moment.MomentLocationResponse -import com.woowacourse.staccato.data.dto.moment.MomentResponse -import com.woowacourse.staccato.data.dto.moment.MomentUpdateRequest +package com.on.staccato.data.moment + +import com.on.staccato.data.dto.moment.FeelingRequest +import com.on.staccato.data.dto.moment.MomentCreationRequest +import com.on.staccato.data.dto.moment.MomentCreationResponse +import com.on.staccato.data.dto.moment.MomentLocationResponse +import com.on.staccato.data.dto.moment.MomentResponse +import com.on.staccato.data.dto.moment.MomentUpdateRequest import retrofit2.Response import retrofit2.http.Body import retrofit2.http.DELETE diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/moment/MomentDefaultRepository.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/moment/MomentDefaultRepository.kt similarity index 82% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/moment/MomentDefaultRepository.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/moment/MomentDefaultRepository.kt index 3860d609a..dc34b33aa 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/moment/MomentDefaultRepository.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/moment/MomentDefaultRepository.kt @@ -1,13 +1,13 @@ -package com.woowacourse.staccato.data.moment +package com.on.staccato.data.moment -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.data.dto.mapper.toDomain -import com.woowacourse.staccato.data.dto.moment.FeelingRequest -import com.woowacourse.staccato.data.dto.moment.MomentCreationRequest -import com.woowacourse.staccato.data.dto.moment.MomentCreationResponse -import com.woowacourse.staccato.domain.model.Moment -import com.woowacourse.staccato.domain.model.MomentLocation -import com.woowacourse.staccato.domain.repository.MomentRepository +import com.on.staccato.data.ResponseResult +import com.on.staccato.data.dto.mapper.toDomain +import com.on.staccato.data.dto.moment.FeelingRequest +import com.on.staccato.data.dto.moment.MomentCreationRequest +import com.on.staccato.data.dto.moment.MomentCreationResponse +import com.on.staccato.domain.model.Moment +import com.on.staccato.domain.model.MomentLocation +import com.on.staccato.domain.repository.MomentRepository import java.time.LocalDateTime class MomentDefaultRepository(private val remoteDataSource: MomentRemoteDataSource) : diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/moment/MomentRemoteDataSource.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/moment/MomentRemoteDataSource.kt similarity index 68% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/moment/MomentRemoteDataSource.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/moment/MomentRemoteDataSource.kt index 955032d6a..580fd4907 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/moment/MomentRemoteDataSource.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/moment/MomentRemoteDataSource.kt @@ -1,13 +1,13 @@ -package com.woowacourse.staccato.data.moment +package com.on.staccato.data.moment -import com.woowacourse.staccato.data.ApiResponseHandler.handleApiResponse -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.data.dto.moment.FeelingRequest -import com.woowacourse.staccato.data.dto.moment.MomentCreationRequest -import com.woowacourse.staccato.data.dto.moment.MomentCreationResponse -import com.woowacourse.staccato.data.dto.moment.MomentLocationResponse -import com.woowacourse.staccato.data.dto.moment.MomentResponse -import com.woowacourse.staccato.data.dto.moment.MomentUpdateRequest +import com.on.staccato.data.ApiResponseHandler.handleApiResponse +import com.on.staccato.data.ResponseResult +import com.on.staccato.data.dto.moment.FeelingRequest +import com.on.staccato.data.dto.moment.MomentCreationRequest +import com.on.staccato.data.dto.moment.MomentCreationResponse +import com.on.staccato.data.dto.moment.MomentLocationResponse +import com.on.staccato.data.dto.moment.MomentResponse +import com.on.staccato.data.dto.moment.MomentUpdateRequest class MomentRemoteDataSource( private val momentApiService: MomentApiService, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/timeline/TimeLineApiService.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/timeline/TimeLineApiService.kt similarity index 55% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/timeline/TimeLineApiService.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/timeline/TimeLineApiService.kt index 9d45ffda4..498729390 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/timeline/TimeLineApiService.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/timeline/TimeLineApiService.kt @@ -1,7 +1,7 @@ -package com.woowacourse.staccato.data.timeline +package com.on.staccato.data.timeline -import com.woowacourse.staccato.data.dto.timeline.TimelineResponse -import com.woowacourse.staccato.data.memory.MemoryApiService.Companion.MEMORIES_PATH +import com.on.staccato.data.dto.timeline.TimelineResponse +import com.on.staccato.data.memory.MemoryApiService.Companion.MEMORIES_PATH import retrofit2.Response import retrofit2.http.GET import retrofit2.http.Query diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/timeline/TimelineDataSource.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/timeline/TimelineDataSource.kt similarity index 51% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/timeline/TimelineDataSource.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/timeline/TimelineDataSource.kt index c606c713a..403aa9e1e 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/timeline/TimelineDataSource.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/timeline/TimelineDataSource.kt @@ -1,7 +1,7 @@ -package com.woowacourse.staccato.data.timeline +package com.on.staccato.data.timeline -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.data.dto.timeline.TimelineResponse +import com.on.staccato.data.ResponseResult +import com.on.staccato.data.dto.timeline.TimelineResponse interface TimelineDataSource { suspend fun getAllTimeline(): ResponseResult diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/timeline/TimelineDefaultRepository.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/timeline/TimelineDefaultRepository.kt similarity index 77% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/timeline/TimelineDefaultRepository.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/timeline/TimelineDefaultRepository.kt index 0e65e00a5..10ed2bdf6 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/timeline/TimelineDefaultRepository.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/timeline/TimelineDefaultRepository.kt @@ -1,9 +1,9 @@ -package com.woowacourse.staccato.data.timeline +package com.on.staccato.data.timeline -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.data.dto.mapper.toDomain -import com.woowacourse.staccato.domain.model.Timeline -import com.woowacourse.staccato.domain.repository.TimelineRepository +import com.on.staccato.data.ResponseResult +import com.on.staccato.data.dto.mapper.toDomain +import com.on.staccato.domain.model.Timeline +import com.on.staccato.domain.repository.TimelineRepository class TimelineDefaultRepository( private val timelineDataSource: TimelineDataSource = TimelineRemoteDataSource(), diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/timeline/TimelineRemoteDataSource.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/timeline/TimelineRemoteDataSource.kt similarity index 65% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/timeline/TimelineRemoteDataSource.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/data/timeline/TimelineRemoteDataSource.kt index 96a94b3b7..0b7e69fa2 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/timeline/TimelineRemoteDataSource.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/data/timeline/TimelineRemoteDataSource.kt @@ -1,9 +1,9 @@ -package com.woowacourse.staccato.data.timeline +package com.on.staccato.data.timeline -import com.woowacourse.staccato.data.ApiResponseHandler.handleApiResponse -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.data.StaccatoClient -import com.woowacourse.staccato.data.dto.timeline.TimelineResponse +import com.on.staccato.data.ApiResponseHandler.handleApiResponse +import com.on.staccato.data.ResponseResult +import com.on.staccato.data.StaccatoClient +import com.on.staccato.data.dto.timeline.TimelineResponse class TimelineRemoteDataSource( private val timelineApiService: TimeLineApiService = StaccatoClient.timelineService, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/Comment.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/Comment.kt similarity index 77% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/Comment.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/Comment.kt index e6dd8c0ba..e4accaff1 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/Comment.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/Comment.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.domain.model +package com.on.staccato.domain.model data class Comment( val commentId: Long, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/Feeling.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/Feeling.kt similarity index 92% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/Feeling.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/Feeling.kt index f1ac5857e..f1e6a345b 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/Feeling.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/Feeling.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.domain.model +package com.on.staccato.domain.model enum class Feeling(val value: String) { HAPPY("happy"), diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/Member.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/Member.kt similarity index 70% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/Member.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/Member.kt index edff9e020..e80e943a2 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/Member.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/Member.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.domain.model +package com.on.staccato.domain.model data class Member( val memberId: Long, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/Memory.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/Memory.kt similarity index 86% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/Memory.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/Memory.kt index ca86cdba1..45d0dc179 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/Memory.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/Memory.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.domain.model +package com.on.staccato.domain.model import java.time.LocalDate diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/MemoryCandidate.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/MemoryCandidate.kt similarity index 77% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/MemoryCandidate.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/MemoryCandidate.kt index 5e024bc6c..737c6c2ab 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/MemoryCandidate.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/MemoryCandidate.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.domain.model +package com.on.staccato.domain.model data class MemoryCandidates(val memoryCandidate: List) diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/MemoryMoment.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/MemoryMoment.kt similarity index 80% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/MemoryMoment.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/MemoryMoment.kt index c885e7658..d9a7880b4 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/MemoryMoment.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/MemoryMoment.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.domain.model +package com.on.staccato.domain.model import java.time.LocalDateTime diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/Moment.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/Moment.kt similarity index 87% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/Moment.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/Moment.kt index 57cfc64c4..20f565115 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/Moment.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/Moment.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.domain.model +package com.on.staccato.domain.model import java.time.LocalDateTime diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/MomentLocation.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/MomentLocation.kt similarity index 69% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/MomentLocation.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/MomentLocation.kt index 042c27905..8d9712c37 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/MomentLocation.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/MomentLocation.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.domain.model +package com.on.staccato.domain.model data class MomentLocation( val momentId: Long, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/NewComment.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/NewComment.kt similarity index 61% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/NewComment.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/NewComment.kt index 6e0acf073..b3874b7f9 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/NewComment.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/NewComment.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.domain.model +package com.on.staccato.domain.model data class NewComment( val momentId: Long, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/NewMemory.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/NewMemory.kt similarity index 82% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/NewMemory.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/NewMemory.kt index cca492904..e6e619447 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/NewMemory.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/NewMemory.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.domain.model +package com.on.staccato.domain.model import java.time.LocalDate diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/Timeline.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/Timeline.kt similarity index 51% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/Timeline.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/Timeline.kt index 4913431d4..aaf6cd1fa 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/model/Timeline.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/model/Timeline.kt @@ -1,3 +1,3 @@ -package com.woowacourse.staccato.domain.model +package com.on.staccato.domain.model data class Timeline(val memories: List) diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/repository/CommentRepository.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/repository/CommentRepository.kt similarity index 63% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/repository/CommentRepository.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/domain/repository/CommentRepository.kt index 911beb401..aaf11b79f 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/repository/CommentRepository.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/repository/CommentRepository.kt @@ -1,8 +1,8 @@ -package com.woowacourse.staccato.domain.repository +package com.on.staccato.domain.repository -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.domain.model.Comment -import com.woowacourse.staccato.domain.model.NewComment +import com.on.staccato.data.ResponseResult +import com.on.staccato.domain.model.Comment +import com.on.staccato.domain.model.NewComment interface CommentRepository { suspend fun fetchComments(momentId: Long): ResponseResult> diff --git a/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/repository/ImageRepository.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/repository/ImageRepository.kt new file mode 100644 index 000000000..87bcdd3d5 --- /dev/null +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/repository/ImageRepository.kt @@ -0,0 +1,9 @@ +package com.on.staccato.domain.repository + +import com.on.staccato.data.ResponseResult +import com.on.staccato.data.dto.image.ImageResponse +import okhttp3.MultipartBody + +interface ImageRepository { + suspend fun convertImageFileToUrl(imageFile: MultipartBody.Part): ResponseResult +} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/repository/LoginRepository.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/repository/LoginRepository.kt similarity index 51% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/repository/LoginRepository.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/domain/repository/LoginRepository.kt index c7ab6df4c..e739e9dd3 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/repository/LoginRepository.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/repository/LoginRepository.kt @@ -1,6 +1,6 @@ -package com.woowacourse.staccato.domain.repository +package com.on.staccato.domain.repository -import com.woowacourse.staccato.data.ResponseResult +import com.on.staccato.data.ResponseResult interface LoginRepository { suspend fun loginWithNickname(nickname: String): ResponseResult diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/repository/MemoryRepository.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/repository/MemoryRepository.kt similarity index 57% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/repository/MemoryRepository.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/domain/repository/MemoryRepository.kt index 4693a21e3..b8ba0d598 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/repository/MemoryRepository.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/repository/MemoryRepository.kt @@ -1,10 +1,10 @@ -package com.woowacourse.staccato.domain.repository +package com.on.staccato.domain.repository -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.data.dto.memory.MemoryCreationResponse -import com.woowacourse.staccato.domain.model.Memory -import com.woowacourse.staccato.domain.model.MemoryCandidates -import com.woowacourse.staccato.domain.model.NewMemory +import com.on.staccato.data.ResponseResult +import com.on.staccato.data.dto.memory.MemoryCreationResponse +import com.on.staccato.domain.model.Memory +import com.on.staccato.domain.model.MemoryCandidates +import com.on.staccato.domain.model.NewMemory interface MemoryRepository { suspend fun getMemory(memoryId: Long): ResponseResult diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/repository/MomentRepository.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/repository/MomentRepository.kt similarity index 72% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/repository/MomentRepository.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/domain/repository/MomentRepository.kt index a6aed6b9b..6f44b853f 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/repository/MomentRepository.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/repository/MomentRepository.kt @@ -1,9 +1,9 @@ -package com.woowacourse.staccato.domain.repository +package com.on.staccato.domain.repository -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.data.dto.moment.MomentCreationResponse -import com.woowacourse.staccato.domain.model.Moment -import com.woowacourse.staccato.domain.model.MomentLocation +import com.on.staccato.data.ResponseResult +import com.on.staccato.data.dto.moment.MomentCreationResponse +import com.on.staccato.domain.model.Moment +import com.on.staccato.domain.model.MomentLocation import java.time.LocalDateTime interface MomentRepository { diff --git a/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/repository/TimelineRepository.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/repository/TimelineRepository.kt new file mode 100644 index 000000000..c35a88371 --- /dev/null +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/domain/repository/TimelineRepository.kt @@ -0,0 +1,8 @@ +package com.on.staccato.domain.repository + +import com.on.staccato.data.ResponseResult +import com.on.staccato.domain.model.Timeline + +interface TimelineRepository { + suspend fun getTimeline(): ResponseResult +} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/BindingAdapters.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/BindingAdapters.kt similarity index 96% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/BindingAdapters.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/BindingAdapters.kt index a65940643..eddbe4fec 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/BindingAdapters.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/BindingAdapters.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation +package com.on.staccato.presentation import android.graphics.drawable.Drawable import android.net.Uri @@ -18,10 +18,10 @@ import coil.transform.RoundedCornersTransformation import com.bumptech.glide.Glide import com.bumptech.glide.load.resource.bitmap.RoundedCorners import com.bumptech.glide.request.RequestOptions -import com.woowacourse.staccato.R -import com.woowacourse.staccato.domain.model.MemoryCandidate -import com.woowacourse.staccato.domain.model.MemoryCandidates -import com.woowacourse.staccato.presentation.momentcreation.model.AttachedPhotosUiModel +import com.on.staccato.R +import com.on.staccato.domain.model.MemoryCandidate +import com.on.staccato.domain.model.MemoryCandidates +import com.on.staccato.presentation.momentcreation.model.AttachedPhotosUiModel import okhttp3.internal.format import java.time.LocalDate import java.time.LocalDateTime @@ -440,9 +440,23 @@ fun ImageView.setSelectedState(selected: Boolean) { isSelected = selected } -@BindingAdapter("setImageResource") -fun ImageView.setImageResourceWithId(resId: Int) { - setImageResource(resId) +@BindingAdapter( + value = [ + "colorImageResource", + "grayImageResource", + ], +) +fun ImageView.setImageResourceWithId( + colorResId: Int, + grayResId: Int, +) { + setImageResource( + if (isSelected) { + colorResId + } else { + grayResId + }, + ) } @BindingAdapter("setAddress") diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/base/BindingActivity.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/base/BindingActivity.kt similarity index 93% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/base/BindingActivity.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/base/BindingActivity.kt index d179d3352..44c37f1fe 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/base/BindingActivity.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/base/BindingActivity.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.base +package com.on.staccato.presentation.base import android.os.Bundle import androidx.appcompat.app.AppCompatActivity diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/base/BindingFragment.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/base/BindingFragment.kt similarity index 94% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/base/BindingFragment.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/base/BindingFragment.kt index 79214a595..281de2152 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/base/BindingFragment.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/base/BindingFragment.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.base +package com.on.staccato.presentation.base import android.os.Bundle import android.view.LayoutInflater diff --git a/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/AttachedPhotoHandler.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/AttachedPhotoHandler.kt new file mode 100644 index 000000000..3e1e1e880 --- /dev/null +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/AttachedPhotoHandler.kt @@ -0,0 +1,9 @@ +package com.on.staccato.presentation.common + +import com.on.staccato.presentation.momentcreation.model.AttachedPhotoUiModel + +interface AttachedPhotoHandler { + fun onDeleteClicked(deletedPhoto: AttachedPhotoUiModel) + + fun onAddClicked() +} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/DeleteDialogFragment.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/DeleteDialogFragment.kt similarity index 92% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/DeleteDialogFragment.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/DeleteDialogFragment.kt index b0fe50e6f..4df4a2d59 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/DeleteDialogFragment.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/DeleteDialogFragment.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.common +package com.on.staccato.presentation.common import android.graphics.Color import android.graphics.drawable.ColorDrawable @@ -7,7 +7,7 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.fragment.app.DialogFragment -import com.woowacourse.staccato.databinding.FragmentDeleteDialogBinding +import com.on.staccato.databinding.FragmentDeleteDialogBinding class DeleteDialogFragment(private val dialogHandler: DialogHandler) : DialogFragment() { private var _binding: FragmentDeleteDialogBinding? = null diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/Event.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/Event.kt similarity index 91% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/Event.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/Event.kt index ae611faf2..caebcb80c 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/Event.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/Event.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.common +package com.on.staccato.presentation.common /** * Used as a wrapper for data that is exposed via a LiveData that represents an event. diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/MemberUiModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/MemberUiModel.kt similarity index 97% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/MemberUiModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/MemberUiModel.kt index 5b3ae8d0f..7ee1f2e83 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/MemberUiModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/MemberUiModel.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.common +package com.on.staccato.presentation.common data class MemberUiModel( val id: Long, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/MutableSingleLiveData.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/MutableSingleLiveData.kt similarity index 84% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/MutableSingleLiveData.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/MutableSingleLiveData.kt index 312b3b858..07d9ca183 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/MutableSingleLiveData.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/MutableSingleLiveData.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.common +package com.on.staccato.presentation.common class MutableSingleLiveData : SingleLiveData { constructor() : super() diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/PhotoAttachFragment.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/PhotoAttachFragment.kt similarity index 94% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/PhotoAttachFragment.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/PhotoAttachFragment.kt index b5ed17e94..b9ea62251 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/PhotoAttachFragment.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/PhotoAttachFragment.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.common +package com.on.staccato.presentation.common import android.Manifest.permission.READ_EXTERNAL_STORAGE import android.Manifest.permission.READ_MEDIA_IMAGES @@ -19,10 +19,10 @@ import androidx.activity.result.contract.ActivityResultContracts import androidx.core.content.ContextCompat import com.google.android.material.bottomsheet.BottomSheetDialogFragment import com.google.android.material.snackbar.Snackbar -import com.woowacourse.staccato.R -import com.woowacourse.staccato.databinding.FragmentPhotoAttachBinding -import com.woowacourse.staccato.presentation.momentcreation.OnUrisSelectedListener -import com.woowacourse.staccato.presentation.util.showToast +import com.on.staccato.R +import com.on.staccato.databinding.FragmentPhotoAttachBinding +import com.on.staccato.presentation.momentcreation.OnUrisSelectedListener +import com.on.staccato.presentation.util.showToast class PhotoAttachFragment : BottomSheetDialogFragment(), PhotoAttachHandler { private var _binding: FragmentPhotoAttachBinding? = null diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/PhotoAttachHandler.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/PhotoAttachHandler.kt similarity index 62% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/PhotoAttachHandler.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/PhotoAttachHandler.kt index 10232adee..70b871b62 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/PhotoAttachHandler.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/PhotoAttachHandler.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.common +package com.on.staccato.presentation.common interface PhotoAttachHandler { fun onCameraClicked() diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/SingleLiveData.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/SingleLiveData.kt similarity index 94% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/SingleLiveData.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/SingleLiveData.kt index 7ef4f6906..61ae59777 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/SingleLiveData.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/SingleLiveData.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.common +package com.on.staccato.presentation.common import androidx.lifecycle.LifecycleOwner import androidx.lifecycle.MutableLiveData diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/ToolbarHandler.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/ToolbarHandler.kt similarity index 61% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/ToolbarHandler.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/ToolbarHandler.kt index 544d47ce2..cf8872b67 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/ToolbarHandler.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/common/ToolbarHandler.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.common +package com.on.staccato.presentation.common interface ToolbarHandler { fun onUpdateClicked() diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/login/LoginActivity.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/login/LoginActivity.kt similarity index 87% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/login/LoginActivity.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/login/LoginActivity.kt index d44f1b786..4fc66c047 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/login/LoginActivity.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/login/LoginActivity.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.login +package com.on.staccato.presentation.login import android.content.Intent import android.os.Bundle @@ -11,13 +11,13 @@ import androidx.core.splashscreen.SplashScreen import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen import androidx.databinding.DataBindingUtil import androidx.lifecycle.lifecycleScope -import com.woowacourse.staccato.R -import com.woowacourse.staccato.StaccatoApplication.Companion.userInfoPrefsManager -import com.woowacourse.staccato.databinding.ActivityLoginBinding -import com.woowacourse.staccato.presentation.login.viewmodel.LoginViewModel -import com.woowacourse.staccato.presentation.login.viewmodel.LoginViewModelFactory -import com.woowacourse.staccato.presentation.main.MainActivity -import com.woowacourse.staccato.presentation.util.showToast +import com.on.staccato.R +import com.on.staccato.StaccatoApplication.Companion.userInfoPrefsManager +import com.on.staccato.databinding.ActivityLoginBinding +import com.on.staccato.presentation.login.viewmodel.LoginViewModel +import com.on.staccato.presentation.login.viewmodel.LoginViewModelFactory +import com.on.staccato.presentation.main.MainActivity +import com.on.staccato.presentation.util.showToast import kotlinx.coroutines.delay import kotlinx.coroutines.launch diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/login/LoginHandler.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/login/LoginHandler.kt similarity index 60% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/login/LoginHandler.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/login/LoginHandler.kt index c1fd58aab..995903046 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/login/LoginHandler.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/login/LoginHandler.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.login +package com.on.staccato.presentation.login interface LoginHandler { fun onStartClicked() diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/login/viewmodel/LoginViewModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/login/viewmodel/LoginViewModel.kt similarity index 77% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/login/viewmodel/LoginViewModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/login/viewmodel/LoginViewModel.kt index b33b5902d..bb997f422 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/login/viewmodel/LoginViewModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/login/viewmodel/LoginViewModel.kt @@ -1,17 +1,17 @@ -package com.woowacourse.staccato.presentation.login.viewmodel +package com.on.staccato.presentation.login.viewmodel import android.util.Log import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.woowacourse.staccato.StaccatoApplication -import com.woowacourse.staccato.data.ApiResponseHandler.onException -import com.woowacourse.staccato.data.ApiResponseHandler.onServerError -import com.woowacourse.staccato.data.ApiResponseHandler.onSuccess -import com.woowacourse.staccato.data.dto.Status -import com.woowacourse.staccato.domain.repository.LoginRepository -import com.woowacourse.staccato.presentation.common.MutableSingleLiveData -import com.woowacourse.staccato.presentation.common.SingleLiveData +import com.on.staccato.StaccatoApplication +import com.on.staccato.data.ApiResponseHandler.onException +import com.on.staccato.data.ApiResponseHandler.onServerError +import com.on.staccato.data.ApiResponseHandler.onSuccess +import com.on.staccato.data.dto.Status +import com.on.staccato.domain.repository.LoginRepository +import com.on.staccato.presentation.common.MutableSingleLiveData +import com.on.staccato.presentation.common.SingleLiveData import kotlinx.coroutines.launch class LoginViewModel(private val repository: LoginRepository) : ViewModel() { diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/login/viewmodel/LoginViewModelFactory.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/login/viewmodel/LoginViewModelFactory.kt similarity index 73% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/login/viewmodel/LoginViewModelFactory.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/login/viewmodel/LoginViewModelFactory.kt index 2d59777ca..3f7a17e05 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/login/viewmodel/LoginViewModelFactory.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/login/viewmodel/LoginViewModelFactory.kt @@ -1,9 +1,9 @@ -package com.woowacourse.staccato.presentation.login.viewmodel +package com.on.staccato.presentation.login.viewmodel import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider -import com.woowacourse.staccato.data.login.LoginDefaultRepository -import com.woowacourse.staccato.domain.repository.LoginRepository +import com.on.staccato.data.login.LoginDefaultRepository +import com.on.staccato.domain.repository.LoginRepository class LoginViewModelFactory( private val repository: LoginRepository = LoginDefaultRepository(), diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/main/MainActivity.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/main/MainActivity.kt similarity index 68% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/main/MainActivity.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/main/MainActivity.kt index b679401e0..3759167bf 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/main/MainActivity.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/main/MainActivity.kt @@ -1,9 +1,9 @@ -package com.woowacourse.staccato.presentation.main +package com.on.staccato.presentation.main import android.os.Bundle -import android.view.Gravity +import android.view.MotionEvent import android.view.View -import android.widget.PopupMenu +import android.view.inputmethod.InputMethodManager import androidx.activity.addCallback import androidx.activity.result.contract.ActivityResultContracts import androidx.activity.viewModels @@ -15,16 +15,16 @@ import androidx.navigation.fragment.NavHostFragment import com.google.android.material.bottomsheet.BottomSheetBehavior import com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_COLLAPSED import com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_EXPANDED -import com.woowacourse.staccato.R -import com.woowacourse.staccato.databinding.ActivityMainBinding -import com.woowacourse.staccato.presentation.base.BindingActivity -import com.woowacourse.staccato.presentation.maps.MapsFragment.Companion.BOTTOM_SHEET_NEW_STATE -import com.woowacourse.staccato.presentation.maps.MapsFragment.Companion.BOTTOM_SHEET_STATE_REQUEST_KEY -import com.woowacourse.staccato.presentation.memory.MemoryFragment.Companion.MEMORY_ID_KEY -import com.woowacourse.staccato.presentation.memorycreation.MemoryCreationActivity -import com.woowacourse.staccato.presentation.moment.MomentFragment.Companion.MOMENT_ID_KEY -import com.woowacourse.staccato.presentation.momentcreation.MomentCreationActivity -import com.woowacourse.staccato.presentation.util.showToast +import com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_HALF_EXPANDED +import com.on.staccato.R +import com.on.staccato.databinding.ActivityMainBinding +import com.on.staccato.presentation.base.BindingActivity +import com.on.staccato.presentation.maps.MapsFragment.Companion.BOTTOM_SHEET_NEW_STATE +import com.on.staccato.presentation.maps.MapsFragment.Companion.BOTTOM_SHEET_STATE_REQUEST_KEY +import com.on.staccato.presentation.memory.MemoryFragment.Companion.MEMORY_ID_KEY +import com.on.staccato.presentation.moment.MomentFragment.Companion.MOMENT_ID_KEY +import com.on.staccato.presentation.momentcreation.MomentCreationActivity +import com.on.staccato.presentation.util.showToast class MainActivity : BindingActivity(), MainHandler { override val layoutResourceId: Int @@ -34,6 +34,9 @@ class MainActivity : BindingActivity(), MainHandler { private lateinit var navHostFragment: NavHostFragment private lateinit var navController: NavController private val sharedViewModel: SharedViewModel by viewModels() + private val inputManager: InputMethodManager by lazy { + getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager + } val memoryCreationLauncher = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result -> @@ -99,37 +102,7 @@ class MainActivity : BindingActivity(), MainHandler { setUpBottomSheetStateListener() } - override fun onCreationClicked() { - val popup = inflateCreationMenu(binding.ivMainCreation) - setUpCreationMenu(popup) - popup.show() - } - - private fun inflateCreationMenu(view: View): PopupMenu { - val popup = PopupMenu(this, view, Gravity.END, 0, R.style.Theme_Staccato_AN_PopupMenu) - popup.menuInflater.inflate(R.menu.menu_creation, popup.menu) - return popup - } - - private fun setUpCreationMenu(popup: PopupMenu) { - popup.setOnMenuItemClickListener { menuItem -> - when (menuItem.itemId) { - R.id.memory_creation -> navigateToMemoryCreation() - R.id.staccato_creation -> navigateToStaccatoCreation() - } - false - } - } - - private fun navigateToMemoryCreation() { - MemoryCreationActivity.startWithResultLauncher( - this, - memoryCreationLauncher, - ) - } - - private fun navigateToStaccatoCreation() { - // TODO : 현재 날짜, 시간을 기준으로 여행이 있으면 메인 -> 방문 기록 생성 플로우 구현 + override fun onStaccatoCreationClicked() { MomentCreationActivity.startWithResultLauncher( 0L, "임시 추억", @@ -142,6 +115,8 @@ class MainActivity : BindingActivity(), MainHandler { var backPressedTime = 0L onBackPressedDispatcher.addCallback { if (behavior.state == STATE_EXPANDED) { + behavior.state = STATE_HALF_EXPANDED + } else if (behavior.state == STATE_HALF_EXPANDED) { behavior.state = STATE_COLLAPSED } else { handleBackPressedTwice(backPressedTime).also { @@ -162,7 +137,9 @@ class MainActivity : BindingActivity(), MainHandler { } private fun setupBottomSheetController() { - behavior = BottomSheetBehavior.from(binding.constraintMainBottomSheet) + behavior = + BottomSheetBehavior.from(binding.constraintMainBottomSheet) + .apply { setState(STATE_HALF_EXPANDED) } navHostFragment = supportFragmentManager.findFragmentById(R.id.fragment_container_view_main_bottom_sheet) as NavHostFragment navController = navHostFragment.navController @@ -195,14 +172,28 @@ class MainActivity : BindingActivity(), MainHandler { bottomSheet: View, newState: Int, ) { + when (newState) { + STATE_EXPANDED -> { + binding.viewMainDragBar.visibility = + View.INVISIBLE + binding.constraintMainBottomSheet.setBackgroundResource( + R.drawable.shape_bottom_sheet_square, + ) + } + + else -> { + binding.viewMainDragBar.visibility = View.VISIBLE + binding.constraintMainBottomSheet.setBackgroundResource( + R.drawable.shape_bottom_sheet_20dp, + ) + } + } } override fun onSlide( - bottomSheet: View, - slideOffset: Float, + p0: View, + p1: Float, ) { - binding.tvMainBottomSheetRemindYourMemories.alpha = 1 - slideOffset - binding.ivMainBottomSheetRemindYourMemories.alpha = 1 - slideOffset } }, ) @@ -218,4 +209,36 @@ class MainActivity : BindingActivity(), MainHandler { behavior.state = newState } } + + override fun dispatchTouchEvent(event: MotionEvent): Boolean { + if (event.action == MotionEvent.ACTION_DOWN) { + currentFocus?.let { view -> + if (!isTouchInsideView(event, view)) { + clearFocusAndHideKeyboard(view) + } + } + } + return super.dispatchTouchEvent(event) + } + + private fun isTouchInsideView( + event: MotionEvent, + view: View, + ): Boolean { + val rect = android.graphics.Rect() + view.getGlobalVisibleRect(rect) + return rect.contains(event.rawX.toInt(), event.rawY.toInt()) + } + + private fun clearFocusAndHideKeyboard(view: View) { + view.clearFocus() + hideKeyboard(view) + } + + private fun hideKeyboard(view: View) { + inputManager.hideSoftInputFromWindow( + view.windowToken, + InputMethodManager.HIDE_NOT_ALWAYS, + ) + } } diff --git a/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/main/MainHandler.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/main/MainHandler.kt new file mode 100644 index 000000000..bddc7f00e --- /dev/null +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/main/MainHandler.kt @@ -0,0 +1,5 @@ +package com.on.staccato.presentation.main + +interface MainHandler { + fun onStaccatoCreationClicked() +} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/main/SharedViewModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/main/SharedViewModel.kt similarity index 73% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/main/SharedViewModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/main/SharedViewModel.kt index eec27d2f3..05d799ab2 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/main/SharedViewModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/main/SharedViewModel.kt @@ -1,8 +1,8 @@ -package com.woowacourse.staccato.presentation.main +package com.on.staccato.presentation.main import androidx.lifecycle.ViewModel -import com.woowacourse.staccato.presentation.common.MutableSingleLiveData -import com.woowacourse.staccato.presentation.common.SingleLiveData +import com.on.staccato.presentation.common.MutableSingleLiveData +import com.on.staccato.presentation.common.SingleLiveData class SharedViewModel : ViewModel() { private val _isTimelineUpdated = MutableSingleLiveData(false) diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/mapper/MemoryMapper.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/mapper/MemoryMapper.kt similarity index 60% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/mapper/MemoryMapper.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/mapper/MemoryMapper.kt index 26dd0d897..5e563c89f 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/mapper/MemoryMapper.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/mapper/MemoryMapper.kt @@ -1,11 +1,11 @@ -package com.woowacourse.staccato.presentation.mapper +package com.on.staccato.presentation.mapper -import com.woowacourse.staccato.domain.model.Member -import com.woowacourse.staccato.domain.model.Memory -import com.woowacourse.staccato.domain.model.MemoryMoment -import com.woowacourse.staccato.presentation.common.MemberUiModel -import com.woowacourse.staccato.presentation.memory.model.MemoryUiModel -import com.woowacourse.staccato.presentation.memory.model.MemoryVisitUiModel +import com.on.staccato.domain.model.Member +import com.on.staccato.domain.model.Memory +import com.on.staccato.domain.model.MemoryMoment +import com.on.staccato.presentation.common.MemberUiModel +import com.on.staccato.presentation.memory.model.MemoryUiModel +import com.on.staccato.presentation.memory.model.MemoryVisitUiModel fun Memory.toUiModel() = MemoryUiModel( diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/mapper/TimelineMapper.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/mapper/TimelineMapper.kt similarity index 62% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/mapper/TimelineMapper.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/mapper/TimelineMapper.kt index d80d2b2fb..2bc14e008 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/mapper/TimelineMapper.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/mapper/TimelineMapper.kt @@ -1,8 +1,8 @@ -package com.woowacourse.staccato.presentation.mapper +package com.on.staccato.presentation.mapper -import com.woowacourse.staccato.domain.model.Memory -import com.woowacourse.staccato.domain.model.Timeline -import com.woowacourse.staccato.presentation.timeline.model.TimelineUiModel +import com.on.staccato.domain.model.Memory +import com.on.staccato.domain.model.Timeline +import com.on.staccato.presentation.timeline.model.TimelineUiModel fun Timeline.toTimelineUiModel(): List { return memories.map { memory -> diff --git a/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/mapper/VisitUiModelMapper.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/mapper/VisitUiModelMapper.kt new file mode 100644 index 000000000..fd9c3d135 --- /dev/null +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/mapper/VisitUiModelMapper.kt @@ -0,0 +1,57 @@ +package com.on.staccato.presentation.mapper + +import com.on.staccato.R +import com.on.staccato.domain.model.Comment +import com.on.staccato.domain.model.Feeling +import com.on.staccato.domain.model.Moment +import com.on.staccato.presentation.moment.comments.CommentUiModel +import com.on.staccato.presentation.moment.detail.MomentDetailUiModel +import com.on.staccato.presentation.moment.feeling.FeelingUiModel +import com.on.staccato.presentation.visitupdate.model.VisitUpdateDefaultUiModel + +fun Moment.toMomentDetailUiModel(): MomentDetailUiModel { + return MomentDetailUiModel( + id = momentId, + memoryId = memoryId, + memoryTitle = memoryTitle, + placeName = placeName, + momentImageUrls = momentImageUrls, + address = address, + visitedAt = visitedAt, + ) +} + +fun Moment.toVisitUpdateDefaultUiModel(): VisitUpdateDefaultUiModel { + return VisitUpdateDefaultUiModel( + id = momentId, + address = address, + visitedAt = visitedAt, + ) +} + +fun Comment.toCommentUiModel() = + CommentUiModel( + id = commentId, + memberId = memberId, + nickname = nickname, + memberImageUrl = memberImageUrl, + content = content, + ) + +fun Feeling.toFeelingUiModel(selectedFeeling: String = Feeling.NOTHING.value): FeelingUiModel { + val colorAndGraySrc = + when (this) { + Feeling.HAPPY -> R.drawable.feeling_happy to R.drawable.feeling_happy_gray + Feeling.ANGRY -> R.drawable.feeling_angry to R.drawable.feeling_angry_gray + Feeling.SAD -> R.drawable.feeling_sad to R.drawable.feeling_sad_gray + Feeling.SCARED -> R.drawable.feeling_scared to R.drawable.feeling_scared_gray + Feeling.EXCITED -> R.drawable.feeling_excited to R.drawable.feeling_excited_gray + Feeling.NOTHING -> null + } + return FeelingUiModel( + value, + colorAndGraySrc?.first, + colorAndGraySrc?.second, + selectedFeeling == this.value, + ) +} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/maps/MapsFragment.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/maps/MapsFragment.kt similarity index 93% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/maps/MapsFragment.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/maps/MapsFragment.kt index e031c21fb..561704a87 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/maps/MapsFragment.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/maps/MapsFragment.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.maps +package com.on.staccato.presentation.maps import android.Manifest import android.content.Intent @@ -30,14 +30,14 @@ import com.google.android.gms.maps.model.Marker import com.google.android.gms.maps.model.MarkerOptions import com.google.android.material.bottomsheet.BottomSheetBehavior import com.google.android.material.snackbar.Snackbar -import com.woowacourse.staccato.R -import com.woowacourse.staccato.data.StaccatoClient.momentApiService -import com.woowacourse.staccato.data.moment.MomentDefaultRepository -import com.woowacourse.staccato.data.moment.MomentRemoteDataSource -import com.woowacourse.staccato.domain.model.MomentLocation -import com.woowacourse.staccato.presentation.main.SharedViewModel -import com.woowacourse.staccato.presentation.maps.model.MarkerUiModel -import com.woowacourse.staccato.presentation.moment.MomentFragment.Companion.MOMENT_ID_KEY +import com.on.staccato.R +import com.on.staccato.data.StaccatoClient.momentApiService +import com.on.staccato.data.moment.MomentDefaultRepository +import com.on.staccato.data.moment.MomentRemoteDataSource +import com.on.staccato.domain.model.MomentLocation +import com.on.staccato.presentation.main.SharedViewModel +import com.on.staccato.presentation.maps.model.MarkerUiModel +import com.on.staccato.presentation.moment.MomentFragment.Companion.MOMENT_ID_KEY class MapsFragment : Fragment() { private val viewModel: MapsViewModel by viewModels { diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/maps/MapsViewModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/maps/MapsViewModel.kt similarity index 75% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/maps/MapsViewModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/maps/MapsViewModel.kt index 98d6f4d94..3874245b7 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/maps/MapsViewModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/maps/MapsViewModel.kt @@ -1,18 +1,18 @@ -package com.woowacourse.staccato.presentation.maps +package com.on.staccato.presentation.maps import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.woowacourse.staccato.data.ApiResponseHandler.onException -import com.woowacourse.staccato.data.ApiResponseHandler.onServerError -import com.woowacourse.staccato.data.ApiResponseHandler.onSuccess -import com.woowacourse.staccato.data.dto.Status -import com.woowacourse.staccato.domain.model.MomentLocation -import com.woowacourse.staccato.domain.repository.MomentRepository -import com.woowacourse.staccato.presentation.common.MutableSingleLiveData -import com.woowacourse.staccato.presentation.common.SingleLiveData -import com.woowacourse.staccato.presentation.maps.model.MarkerUiModel +import com.on.staccato.data.ApiResponseHandler.onException +import com.on.staccato.data.ApiResponseHandler.onServerError +import com.on.staccato.data.ApiResponseHandler.onSuccess +import com.on.staccato.data.dto.Status +import com.on.staccato.domain.model.MomentLocation +import com.on.staccato.domain.repository.MomentRepository +import com.on.staccato.presentation.common.MutableSingleLiveData +import com.on.staccato.presentation.common.SingleLiveData +import com.on.staccato.presentation.maps.model.MarkerUiModel import kotlinx.coroutines.launch class MapsViewModel( diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/maps/MapsViewModelFactory.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/maps/MapsViewModelFactory.kt similarity index 79% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/maps/MapsViewModelFactory.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/maps/MapsViewModelFactory.kt index 38f3aa940..2031d9421 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/maps/MapsViewModelFactory.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/maps/MapsViewModelFactory.kt @@ -1,8 +1,8 @@ -package com.woowacourse.staccato.presentation.maps +package com.on.staccato.presentation.maps import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider -import com.woowacourse.staccato.domain.repository.MomentRepository +import com.on.staccato.domain.repository.MomentRepository class MapsViewModelFactory( private val momentRepository: MomentRepository, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/maps/model/MarkerUiModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/maps/model/MarkerUiModel.kt similarity index 58% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/maps/model/MarkerUiModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/maps/model/MarkerUiModel.kt index 9daf4e8bf..79a0d754f 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/maps/model/MarkerUiModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/maps/model/MarkerUiModel.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.maps.model +package com.on.staccato.presentation.maps.model data class MarkerUiModel( val staccatoId: Long, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/MemoryFragment.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/MemoryFragment.kt similarity index 74% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/MemoryFragment.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/MemoryFragment.kt index 2ee14c5e1..6972aafc1 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/MemoryFragment.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/MemoryFragment.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.memory +package com.on.staccato.presentation.memory import android.os.Bundle import android.view.View @@ -6,25 +6,25 @@ import androidx.core.os.bundleOf import androidx.fragment.app.activityViewModels import androidx.fragment.app.viewModels import androidx.navigation.fragment.findNavController -import com.woowacourse.staccato.R -import com.woowacourse.staccato.data.StaccatoClient.memoryApiService -import com.woowacourse.staccato.data.memory.MemoryDefaultRepository -import com.woowacourse.staccato.data.memory.MemoryRemoteDataSource -import com.woowacourse.staccato.databinding.FragmentMemoryBinding -import com.woowacourse.staccato.presentation.base.BindingFragment -import com.woowacourse.staccato.presentation.common.DeleteDialogFragment -import com.woowacourse.staccato.presentation.common.DialogHandler -import com.woowacourse.staccato.presentation.common.ToolbarHandler -import com.woowacourse.staccato.presentation.main.MainActivity -import com.woowacourse.staccato.presentation.main.SharedViewModel -import com.woowacourse.staccato.presentation.memory.adapter.MatesAdapter -import com.woowacourse.staccato.presentation.memory.adapter.VisitsAdapter -import com.woowacourse.staccato.presentation.memory.viewmodel.MemoryViewModel -import com.woowacourse.staccato.presentation.memory.viewmodel.MemoryViewModelFactory -import com.woowacourse.staccato.presentation.memoryupdate.MemoryUpdateActivity -import com.woowacourse.staccato.presentation.moment.MomentFragment.Companion.MOMENT_ID_KEY -import com.woowacourse.staccato.presentation.momentcreation.MomentCreationActivity -import com.woowacourse.staccato.presentation.util.showToast +import com.on.staccato.R +import com.on.staccato.data.StaccatoClient.memoryApiService +import com.on.staccato.data.memory.MemoryDefaultRepository +import com.on.staccato.data.memory.MemoryRemoteDataSource +import com.on.staccato.databinding.FragmentMemoryBinding +import com.on.staccato.presentation.base.BindingFragment +import com.on.staccato.presentation.common.DeleteDialogFragment +import com.on.staccato.presentation.common.DialogHandler +import com.on.staccato.presentation.common.ToolbarHandler +import com.on.staccato.presentation.main.MainActivity +import com.on.staccato.presentation.main.SharedViewModel +import com.on.staccato.presentation.memory.adapter.MatesAdapter +import com.on.staccato.presentation.memory.adapter.VisitsAdapter +import com.on.staccato.presentation.memory.viewmodel.MemoryViewModel +import com.on.staccato.presentation.memory.viewmodel.MemoryViewModelFactory +import com.on.staccato.presentation.memoryupdate.MemoryUpdateActivity +import com.on.staccato.presentation.moment.MomentFragment.Companion.MOMENT_ID_KEY +import com.on.staccato.presentation.momentcreation.MomentCreationActivity +import com.on.staccato.presentation.util.showToast class MemoryFragment : BindingFragment(R.layout.fragment_memory), diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/MemoryHandler.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/MemoryHandler.kt similarity index 65% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/MemoryHandler.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/MemoryHandler.kt index dd8ed6d56..30a4dfbf6 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/MemoryHandler.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/MemoryHandler.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.memory +package com.on.staccato.presentation.memory interface MemoryHandler { fun onVisitClicked(visitId: Long) diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/adapter/MatesAdapter.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/adapter/MatesAdapter.kt similarity index 87% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/adapter/MatesAdapter.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/adapter/MatesAdapter.kt index 8c651e0bb..5381fe4f1 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/adapter/MatesAdapter.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/adapter/MatesAdapter.kt @@ -1,11 +1,11 @@ -package com.woowacourse.staccato.presentation.memory.adapter +package com.on.staccato.presentation.memory.adapter import android.view.LayoutInflater import android.view.ViewGroup import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.ListAdapter -import com.woowacourse.staccato.databinding.ItemMatesBinding -import com.woowacourse.staccato.presentation.common.MemberUiModel +import com.on.staccato.databinding.ItemMatesBinding +import com.on.staccato.presentation.common.MemberUiModel class MatesAdapter : ListAdapter(diffUtil) { override fun onCreateViewHolder( diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/adapter/MatesViewHolder.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/adapter/MatesViewHolder.kt similarity index 55% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/adapter/MatesViewHolder.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/adapter/MatesViewHolder.kt index 134ba6951..38eaf4717 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/adapter/MatesViewHolder.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/adapter/MatesViewHolder.kt @@ -1,8 +1,8 @@ -package com.woowacourse.staccato.presentation.memory.adapter +package com.on.staccato.presentation.memory.adapter import androidx.recyclerview.widget.RecyclerView.ViewHolder -import com.woowacourse.staccato.databinding.ItemMatesBinding -import com.woowacourse.staccato.presentation.common.MemberUiModel +import com.on.staccato.databinding.ItemMatesBinding +import com.on.staccato.presentation.common.MemberUiModel class MatesViewHolder( private val binding: ItemMatesBinding, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/adapter/VisitsAdapter.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/adapter/VisitsAdapter.kt similarity index 83% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/adapter/VisitsAdapter.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/adapter/VisitsAdapter.kt index db0b02310..af8f00329 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/adapter/VisitsAdapter.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/adapter/VisitsAdapter.kt @@ -1,12 +1,12 @@ -package com.woowacourse.staccato.presentation.memory.adapter +package com.on.staccato.presentation.memory.adapter import android.view.LayoutInflater import android.view.ViewGroup import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.ListAdapter -import com.woowacourse.staccato.databinding.ItemVisitsBinding -import com.woowacourse.staccato.presentation.memory.MemoryHandler -import com.woowacourse.staccato.presentation.memory.model.MemoryVisitUiModel +import com.on.staccato.databinding.ItemVisitsBinding +import com.on.staccato.presentation.memory.MemoryHandler +import com.on.staccato.presentation.memory.model.MemoryVisitUiModel class VisitsAdapter(private val handler: MemoryHandler) : ListAdapter(diffUtil) { override fun onCreateViewHolder( diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/adapter/VisitsViewHolder.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/adapter/VisitsViewHolder.kt similarity index 55% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/adapter/VisitsViewHolder.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/adapter/VisitsViewHolder.kt index 56831750f..787428f63 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/adapter/VisitsViewHolder.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/adapter/VisitsViewHolder.kt @@ -1,9 +1,9 @@ -package com.woowacourse.staccato.presentation.memory.adapter +package com.on.staccato.presentation.memory.adapter import androidx.recyclerview.widget.RecyclerView.ViewHolder -import com.woowacourse.staccato.databinding.ItemVisitsBinding -import com.woowacourse.staccato.presentation.memory.MemoryHandler -import com.woowacourse.staccato.presentation.memory.model.MemoryVisitUiModel +import com.on.staccato.databinding.ItemVisitsBinding +import com.on.staccato.presentation.memory.MemoryHandler +import com.on.staccato.presentation.memory.model.MemoryVisitUiModel class VisitsViewHolder( private val binding: ItemVisitsBinding, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/model/MemoryUiModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/model/MemoryUiModel.kt similarity index 80% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/model/MemoryUiModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/model/MemoryUiModel.kt index 2fcf81c39..1e45e8436 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/model/MemoryUiModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/model/MemoryUiModel.kt @@ -1,7 +1,7 @@ -package com.woowacourse.staccato.presentation.memory.model +package com.on.staccato.presentation.memory.model -import com.woowacourse.staccato.presentation.common.MemberUiModel -import com.woowacourse.staccato.presentation.common.dummyMates +import com.on.staccato.presentation.common.MemberUiModel +import com.on.staccato.presentation.common.dummyMates import java.time.LocalDate data class MemoryUiModel( diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/model/MemoryVisitUiModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/model/MemoryVisitUiModel.kt similarity index 94% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/model/MemoryVisitUiModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/model/MemoryVisitUiModel.kt index f6151392e..530bd23c9 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/model/MemoryVisitUiModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/model/MemoryVisitUiModel.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.memory.model +package com.on.staccato.presentation.memory.model import java.time.LocalDateTime diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/viewmodel/MemoryViewModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/viewmodel/MemoryViewModel.kt similarity index 73% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/viewmodel/MemoryViewModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/viewmodel/MemoryViewModel.kt index e3f901ede..ac04bc970 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/viewmodel/MemoryViewModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/viewmodel/MemoryViewModel.kt @@ -1,20 +1,20 @@ -package com.woowacourse.staccato.presentation.memory.viewmodel +package com.on.staccato.presentation.memory.viewmodel import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.woowacourse.staccato.data.ApiResponseHandler.onException -import com.woowacourse.staccato.data.ApiResponseHandler.onServerError -import com.woowacourse.staccato.data.ApiResponseHandler.onSuccess -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.data.dto.Status -import com.woowacourse.staccato.domain.model.Memory -import com.woowacourse.staccato.domain.repository.MemoryRepository -import com.woowacourse.staccato.presentation.common.MutableSingleLiveData -import com.woowacourse.staccato.presentation.common.SingleLiveData -import com.woowacourse.staccato.presentation.mapper.toUiModel -import com.woowacourse.staccato.presentation.memory.model.MemoryUiModel +import com.on.staccato.data.ApiResponseHandler.onException +import com.on.staccato.data.ApiResponseHandler.onServerError +import com.on.staccato.data.ApiResponseHandler.onSuccess +import com.on.staccato.data.ResponseResult +import com.on.staccato.data.dto.Status +import com.on.staccato.domain.model.Memory +import com.on.staccato.domain.repository.MemoryRepository +import com.on.staccato.presentation.common.MutableSingleLiveData +import com.on.staccato.presentation.common.SingleLiveData +import com.on.staccato.presentation.mapper.toUiModel +import com.on.staccato.presentation.memory.model.MemoryUiModel import kotlinx.coroutines.launch import java.time.LocalDate diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/viewmodel/MemoryViewModelFactory.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/viewmodel/MemoryViewModelFactory.kt similarity index 77% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/viewmodel/MemoryViewModelFactory.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/viewmodel/MemoryViewModelFactory.kt index 65c8f1f5e..c374f6556 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memory/viewmodel/MemoryViewModelFactory.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memory/viewmodel/MemoryViewModelFactory.kt @@ -1,8 +1,8 @@ -package com.woowacourse.staccato.presentation.memory.viewmodel +package com.on.staccato.presentation.memory.viewmodel import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider -import com.woowacourse.staccato.domain.repository.MemoryRepository +import com.on.staccato.domain.repository.MemoryRepository class MemoryViewModelFactory( private val memoryRepository: MemoryRepository, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memorycreation/DateConverter.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memorycreation/DateConverter.kt similarity index 84% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memorycreation/DateConverter.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memorycreation/DateConverter.kt index ece4b153a..ee2cec58f 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memorycreation/DateConverter.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memorycreation/DateConverter.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.memorycreation +package com.on.staccato.presentation.memorycreation import java.time.Instant import java.time.LocalDate diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memorycreation/MemoryCreationActivity.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memorycreation/MemoryCreationActivity.kt similarity index 82% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memorycreation/MemoryCreationActivity.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memorycreation/MemoryCreationActivity.kt index 0098b5e62..3e590d998 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memorycreation/MemoryCreationActivity.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memorycreation/MemoryCreationActivity.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.memorycreation +package com.on.staccato.presentation.memorycreation import android.content.Context import android.content.Intent @@ -13,20 +13,20 @@ import androidx.activity.viewModels import androidx.core.util.Pair import androidx.fragment.app.FragmentManager import com.google.android.material.datepicker.MaterialDatePicker -import com.woowacourse.staccato.R -import com.woowacourse.staccato.data.StaccatoClient.imageApiService -import com.woowacourse.staccato.data.StaccatoClient.memoryApiService -import com.woowacourse.staccato.data.image.ImageDefaultRepository -import com.woowacourse.staccato.data.memory.MemoryDefaultRepository -import com.woowacourse.staccato.data.memory.MemoryRemoteDataSource -import com.woowacourse.staccato.databinding.ActivityMemoryCreationBinding -import com.woowacourse.staccato.presentation.base.BindingActivity -import com.woowacourse.staccato.presentation.common.PhotoAttachFragment -import com.woowacourse.staccato.presentation.memory.MemoryFragment.Companion.MEMORY_ID_KEY -import com.woowacourse.staccato.presentation.memorycreation.viewmodel.MemoryCreationViewModel -import com.woowacourse.staccato.presentation.memorycreation.viewmodel.MemoryCreationViewModelFactory -import com.woowacourse.staccato.presentation.momentcreation.OnUrisSelectedListener -import com.woowacourse.staccato.presentation.util.showToast +import com.on.staccato.R +import com.on.staccato.data.StaccatoClient.imageApiService +import com.on.staccato.data.StaccatoClient.memoryApiService +import com.on.staccato.data.image.ImageDefaultRepository +import com.on.staccato.data.memory.MemoryDefaultRepository +import com.on.staccato.data.memory.MemoryRemoteDataSource +import com.on.staccato.databinding.ActivityMemoryCreationBinding +import com.on.staccato.presentation.base.BindingActivity +import com.on.staccato.presentation.common.PhotoAttachFragment +import com.on.staccato.presentation.memory.MemoryFragment.Companion.MEMORY_ID_KEY +import com.on.staccato.presentation.memorycreation.viewmodel.MemoryCreationViewModel +import com.on.staccato.presentation.memorycreation.viewmodel.MemoryCreationViewModelFactory +import com.on.staccato.presentation.momentcreation.OnUrisSelectedListener +import com.on.staccato.presentation.util.showToast class MemoryCreationActivity : BindingActivity(), diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memorycreation/MemoryCreationHandler.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memorycreation/MemoryCreationHandler.kt similarity index 72% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memorycreation/MemoryCreationHandler.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memorycreation/MemoryCreationHandler.kt index 266ddf152..5d5112656 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memorycreation/MemoryCreationHandler.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memorycreation/MemoryCreationHandler.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.memorycreation +package com.on.staccato.presentation.memorycreation interface MemoryCreationHandler { fun onPeriodSelectionClicked() diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memorycreation/viewmodel/MemoryCreationViewModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memorycreation/viewmodel/MemoryCreationViewModel.kt similarity index 82% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memorycreation/viewmodel/MemoryCreationViewModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memorycreation/viewmodel/MemoryCreationViewModel.kt index 2bebbbc88..8512496ca 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memorycreation/viewmodel/MemoryCreationViewModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memorycreation/viewmodel/MemoryCreationViewModel.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.memorycreation.viewmodel +package com.on.staccato.presentation.memorycreation.viewmodel import android.content.Context import android.net.Uri @@ -7,18 +7,18 @@ import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.woowacourse.staccato.data.ApiResponseHandler.onException -import com.woowacourse.staccato.data.ApiResponseHandler.onServerError -import com.woowacourse.staccato.data.ApiResponseHandler.onSuccess -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.data.dto.Status -import com.woowacourse.staccato.data.dto.image.ImageResponse -import com.woowacourse.staccato.data.dto.memory.MemoryCreationResponse -import com.woowacourse.staccato.domain.model.NewMemory -import com.woowacourse.staccato.domain.repository.ImageRepository -import com.woowacourse.staccato.domain.repository.MemoryRepository -import com.woowacourse.staccato.presentation.memorycreation.DateConverter.convertLongToLocalDate -import com.woowacourse.staccato.presentation.util.convertMemoryUriToFile +import com.on.staccato.data.ApiResponseHandler.onException +import com.on.staccato.data.ApiResponseHandler.onServerError +import com.on.staccato.data.ApiResponseHandler.onSuccess +import com.on.staccato.data.ResponseResult +import com.on.staccato.data.dto.Status +import com.on.staccato.data.dto.image.ImageResponse +import com.on.staccato.data.dto.memory.MemoryCreationResponse +import com.on.staccato.domain.model.NewMemory +import com.on.staccato.domain.repository.ImageRepository +import com.on.staccato.domain.repository.MemoryRepository +import com.on.staccato.presentation.memorycreation.DateConverter.convertLongToLocalDate +import com.on.staccato.presentation.util.convertMemoryUriToFile import kotlinx.coroutines.launch import java.time.LocalDate diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memorycreation/viewmodel/MemoryCreationViewModelFactory.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memorycreation/viewmodel/MemoryCreationViewModelFactory.kt similarity index 72% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memorycreation/viewmodel/MemoryCreationViewModelFactory.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memorycreation/viewmodel/MemoryCreationViewModelFactory.kt index e12af1a49..386e9f8e5 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memorycreation/viewmodel/MemoryCreationViewModelFactory.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memorycreation/viewmodel/MemoryCreationViewModelFactory.kt @@ -1,9 +1,9 @@ -package com.woowacourse.staccato.presentation.memorycreation.viewmodel +package com.on.staccato.presentation.memorycreation.viewmodel import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider -import com.woowacourse.staccato.domain.repository.ImageRepository -import com.woowacourse.staccato.domain.repository.MemoryRepository +import com.on.staccato.domain.repository.ImageRepository +import com.on.staccato.domain.repository.MemoryRepository class MemoryCreationViewModelFactory( private val memoryRepository: MemoryRepository, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memoryupdate/MemoryUpdateActivity.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memoryupdate/MemoryUpdateActivity.kt similarity index 83% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memoryupdate/MemoryUpdateActivity.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memoryupdate/MemoryUpdateActivity.kt index 110000e1c..328993ecc 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memoryupdate/MemoryUpdateActivity.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memoryupdate/MemoryUpdateActivity.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.memoryupdate +package com.on.staccato.presentation.memoryupdate import android.content.Context import android.content.Intent @@ -13,20 +13,20 @@ import androidx.activity.viewModels import androidx.core.util.Pair import androidx.fragment.app.FragmentManager import com.google.android.material.datepicker.MaterialDatePicker -import com.woowacourse.staccato.R -import com.woowacourse.staccato.data.StaccatoClient.imageApiService -import com.woowacourse.staccato.data.StaccatoClient.memoryApiService -import com.woowacourse.staccato.data.image.ImageDefaultRepository -import com.woowacourse.staccato.data.memory.MemoryDefaultRepository -import com.woowacourse.staccato.data.memory.MemoryRemoteDataSource -import com.woowacourse.staccato.databinding.ActivityMemoryUpdateBinding -import com.woowacourse.staccato.presentation.base.BindingActivity -import com.woowacourse.staccato.presentation.common.PhotoAttachFragment -import com.woowacourse.staccato.presentation.memory.MemoryFragment.Companion.MEMORY_ID_KEY -import com.woowacourse.staccato.presentation.memoryupdate.viewmodel.MemoryUpdateViewModel -import com.woowacourse.staccato.presentation.memoryupdate.viewmodel.MemoryUpdateViewModelFactory -import com.woowacourse.staccato.presentation.momentcreation.OnUrisSelectedListener -import com.woowacourse.staccato.presentation.util.showToast +import com.on.staccato.R +import com.on.staccato.data.StaccatoClient.imageApiService +import com.on.staccato.data.StaccatoClient.memoryApiService +import com.on.staccato.data.image.ImageDefaultRepository +import com.on.staccato.data.memory.MemoryDefaultRepository +import com.on.staccato.data.memory.MemoryRemoteDataSource +import com.on.staccato.databinding.ActivityMemoryUpdateBinding +import com.on.staccato.presentation.base.BindingActivity +import com.on.staccato.presentation.common.PhotoAttachFragment +import com.on.staccato.presentation.memory.MemoryFragment.Companion.MEMORY_ID_KEY +import com.on.staccato.presentation.memoryupdate.viewmodel.MemoryUpdateViewModel +import com.on.staccato.presentation.memoryupdate.viewmodel.MemoryUpdateViewModelFactory +import com.on.staccato.presentation.momentcreation.OnUrisSelectedListener +import com.on.staccato.presentation.util.showToast class MemoryUpdateActivity : BindingActivity(), diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memoryupdate/MemoryUpdateHandler.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memoryupdate/MemoryUpdateHandler.kt similarity index 73% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memoryupdate/MemoryUpdateHandler.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memoryupdate/MemoryUpdateHandler.kt index 53ec7ed91..db8fe224a 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memoryupdate/MemoryUpdateHandler.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memoryupdate/MemoryUpdateHandler.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.memoryupdate +package com.on.staccato.presentation.memoryupdate interface MemoryUpdateHandler { fun onPeriodSelectionClicked() diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memoryupdate/viewmodel/MemoryUpdateViewModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memoryupdate/viewmodel/MemoryUpdateViewModel.kt similarity index 83% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memoryupdate/viewmodel/MemoryUpdateViewModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memoryupdate/viewmodel/MemoryUpdateViewModel.kt index 85908355c..d52569e6d 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memoryupdate/viewmodel/MemoryUpdateViewModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memoryupdate/viewmodel/MemoryUpdateViewModel.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.memoryupdate.viewmodel +package com.on.staccato.presentation.memoryupdate.viewmodel import android.content.Context import android.net.Uri @@ -7,20 +7,20 @@ import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.woowacourse.staccato.data.ApiResponseHandler.onException -import com.woowacourse.staccato.data.ApiResponseHandler.onServerError -import com.woowacourse.staccato.data.ApiResponseHandler.onSuccess -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.data.dto.Status -import com.woowacourse.staccato.data.dto.image.ImageResponse -import com.woowacourse.staccato.domain.model.Memory -import com.woowacourse.staccato.domain.model.NewMemory -import com.woowacourse.staccato.domain.repository.ImageRepository -import com.woowacourse.staccato.domain.repository.MemoryRepository -import com.woowacourse.staccato.presentation.common.MutableSingleLiveData -import com.woowacourse.staccato.presentation.common.SingleLiveData -import com.woowacourse.staccato.presentation.memorycreation.DateConverter.convertLongToLocalDate -import com.woowacourse.staccato.presentation.util.convertMemoryUriToFile +import com.on.staccato.data.ApiResponseHandler.onException +import com.on.staccato.data.ApiResponseHandler.onServerError +import com.on.staccato.data.ApiResponseHandler.onSuccess +import com.on.staccato.data.ResponseResult +import com.on.staccato.data.dto.Status +import com.on.staccato.data.dto.image.ImageResponse +import com.on.staccato.domain.model.Memory +import com.on.staccato.domain.model.NewMemory +import com.on.staccato.domain.repository.ImageRepository +import com.on.staccato.domain.repository.MemoryRepository +import com.on.staccato.presentation.common.MutableSingleLiveData +import com.on.staccato.presentation.common.SingleLiveData +import com.on.staccato.presentation.memorycreation.DateConverter.convertLongToLocalDate +import com.on.staccato.presentation.util.convertMemoryUriToFile import kotlinx.coroutines.launch import java.time.LocalDate diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memoryupdate/viewmodel/MemoryUpdateViewModelFactory.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memoryupdate/viewmodel/MemoryUpdateViewModelFactory.kt similarity index 74% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memoryupdate/viewmodel/MemoryUpdateViewModelFactory.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memoryupdate/viewmodel/MemoryUpdateViewModelFactory.kt index 0aa27bf6e..f14fcd36a 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/memoryupdate/viewmodel/MemoryUpdateViewModelFactory.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/memoryupdate/viewmodel/MemoryUpdateViewModelFactory.kt @@ -1,9 +1,9 @@ -package com.woowacourse.staccato.presentation.memoryupdate.viewmodel +package com.on.staccato.presentation.memoryupdate.viewmodel import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider -import com.woowacourse.staccato.domain.repository.ImageRepository -import com.woowacourse.staccato.domain.repository.MemoryRepository +import com.on.staccato.domain.repository.ImageRepository +import com.on.staccato.domain.repository.MemoryRepository class MemoryUpdateViewModelFactory( private val memoryId: Long, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/MomentFragment.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/MomentFragment.kt similarity index 80% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/MomentFragment.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/MomentFragment.kt index 018e548a4..2b62bdae2 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/MomentFragment.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/MomentFragment.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.moment +package com.on.staccato.presentation.moment import android.os.Bundle import android.view.View @@ -7,19 +7,19 @@ import androidx.fragment.app.activityViewModels import androidx.fragment.app.viewModels import androidx.navigation.fragment.findNavController import com.google.android.material.tabs.TabLayoutMediator -import com.woowacourse.staccato.R -import com.woowacourse.staccato.databinding.FragmentMomentBinding -import com.woowacourse.staccato.presentation.base.BindingFragment -import com.woowacourse.staccato.presentation.common.DeleteDialogFragment -import com.woowacourse.staccato.presentation.main.MainActivity -import com.woowacourse.staccato.presentation.main.SharedViewModel -import com.woowacourse.staccato.presentation.moment.comments.MomentCommentsFragment -import com.woowacourse.staccato.presentation.moment.detail.ViewpagePhotoAdapter -import com.woowacourse.staccato.presentation.moment.feeling.MomentFeelingSelectionFragment -import com.woowacourse.staccato.presentation.moment.viewmodel.MomentViewModel -import com.woowacourse.staccato.presentation.moment.viewmodel.MomentViewModelFactory -import com.woowacourse.staccato.presentation.util.showToast -import com.woowacourse.staccato.presentation.visitupdate.VisitUpdateActivity +import com.on.staccato.R +import com.on.staccato.databinding.FragmentMomentBinding +import com.on.staccato.presentation.base.BindingFragment +import com.on.staccato.presentation.common.DeleteDialogFragment +import com.on.staccato.presentation.main.MainActivity +import com.on.staccato.presentation.main.SharedViewModel +import com.on.staccato.presentation.moment.comments.MomentCommentsFragment +import com.on.staccato.presentation.moment.detail.ViewpagePhotoAdapter +import com.on.staccato.presentation.moment.feeling.MomentFeelingSelectionFragment +import com.on.staccato.presentation.moment.viewmodel.MomentViewModel +import com.on.staccato.presentation.moment.viewmodel.MomentViewModelFactory +import com.on.staccato.presentation.util.showToast +import com.on.staccato.presentation.visitupdate.VisitUpdateActivity import kotlin.properties.Delegates class MomentFragment : diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/MomentToolbarHandler.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/MomentToolbarHandler.kt similarity index 73% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/MomentToolbarHandler.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/MomentToolbarHandler.kt index 7fa24e7b0..5f81e5aa8 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/MomentToolbarHandler.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/MomentToolbarHandler.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.moment +package com.on.staccato.presentation.moment interface MomentToolbarHandler { fun onUpdateClicked( diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/CommentHandler.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/CommentHandler.kt similarity index 71% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/CommentHandler.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/CommentHandler.kt index 96d6b7851..5a8ee42b6 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/CommentHandler.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/CommentHandler.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.moment.comments +package com.on.staccato.presentation.moment.comments interface CommentHandler { fun onSendButtonClicked() diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/CommentUiModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/CommentUiModel.kt similarity index 73% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/CommentUiModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/CommentUiModel.kt index 99405ba01..552f898db 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/CommentUiModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/CommentUiModel.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.moment.comments +package com.on.staccato.presentation.moment.comments data class CommentUiModel( val id: Long = 0, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/CommentViewHolder.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/CommentViewHolder.kt similarity index 61% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/CommentViewHolder.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/CommentViewHolder.kt index b865a8ee0..1fe94465a 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/CommentViewHolder.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/CommentViewHolder.kt @@ -1,18 +1,27 @@ -package com.woowacourse.staccato.presentation.moment.comments +package com.on.staccato.presentation.moment.comments import android.view.Gravity import android.view.View import android.widget.PopupMenu +import androidx.fragment.app.FragmentManager import androidx.recyclerview.widget.RecyclerView -import com.woowacourse.staccato.R -import com.woowacourse.staccato.databinding.ItemMomentMyCommentBinding +import com.on.staccato.R +import com.on.staccato.databinding.ItemMomentMyCommentBinding +import com.on.staccato.presentation.common.DeleteDialogFragment +import com.on.staccato.presentation.common.DialogHandler // Todo: 추후 나의 댓글, 다른 사용자의 댓글 구분하기 class CommentViewHolder( private val binding: ItemMomentMyCommentBinding, private val commentHandler: CommentHandler, -) : - RecyclerView.ViewHolder(binding.root) { +) : RecyclerView.ViewHolder(binding.root), + DialogHandler { + private val deleteDialogFragment = DeleteDialogFragment { onConfirmClicked() } + + override fun onConfirmClicked() { + binding.myComment?.id?.let { commentHandler.onDeleteButtonClicked(it) } + } + fun bind(commentUiModel: CommentUiModel) { binding.myComment = commentUiModel binding.root.setOnLongClickListener { @@ -37,19 +46,11 @@ class CommentViewHolder( private fun setUpCreationMenu(popup: PopupMenu) { popup.setOnMenuItemClickListener { menuItem -> when (menuItem.itemId) { - R.id.comment_update -> - binding.myComment?.id?.let { - commentHandler.onUpdateButtonClicked( - it, - ) - } - R.id.comment_delete -> - binding.myComment?.id?.let { - commentHandler.onDeleteButtonClicked( - it, - ) - } + deleteDialogFragment.show( + FragmentManager.findFragmentManager(binding.root), + DeleteDialogFragment.TAG, + ) } false } diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/CommentsAdapter.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/CommentsAdapter.kt similarity index 91% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/CommentsAdapter.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/CommentsAdapter.kt index 506fcc889..ce90e73e7 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/CommentsAdapter.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/CommentsAdapter.kt @@ -1,10 +1,10 @@ -package com.woowacourse.staccato.presentation.moment.comments +package com.on.staccato.presentation.moment.comments import android.view.LayoutInflater import android.view.ViewGroup import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.ListAdapter -import com.woowacourse.staccato.databinding.ItemMomentMyCommentBinding +import com.on.staccato.databinding.ItemMomentMyCommentBinding class CommentsAdapter(private val commentHandler: CommentHandler) : ListAdapter(diffUtil) { diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/MomentCommentsFragment.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/MomentCommentsFragment.kt similarity index 62% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/MomentCommentsFragment.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/MomentCommentsFragment.kt index 8d5daed4e..82eba3e07 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/MomentCommentsFragment.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/MomentCommentsFragment.kt @@ -1,22 +1,19 @@ -package com.woowacourse.staccato.presentation.moment.comments +package com.on.staccato.presentation.moment.comments -import android.content.Context.INPUT_METHOD_SERVICE import android.os.Bundle import android.view.View import android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE -import android.view.inputmethod.InputMethodManager import androidx.fragment.app.viewModels -import com.woowacourse.staccato.R -import com.woowacourse.staccato.databinding.FragmentMomentCommentsBinding -import com.woowacourse.staccato.presentation.base.BindingFragment -import com.woowacourse.staccato.presentation.moment.viewmodel.MomentViewModel -import com.woowacourse.staccato.presentation.moment.viewmodel.MomentViewModelFactory -import com.woowacourse.staccato.presentation.util.showToast +import com.on.staccato.R +import com.on.staccato.databinding.FragmentMomentCommentsBinding +import com.on.staccato.presentation.base.BindingFragment +import com.on.staccato.presentation.moment.viewmodel.MomentViewModel +import com.on.staccato.presentation.moment.viewmodel.MomentViewModelFactory +import com.on.staccato.presentation.util.showToast import kotlin.properties.Delegates class MomentCommentsFragment : - BindingFragment(R.layout.fragment_moment_comments), - KeyboardActionHandler { + BindingFragment(R.layout.fragment_moment_comments) { private lateinit var commentsAdapter: CommentsAdapter private var momentId by Delegates.notNull() private val commentsViewModel: MomentCommentsViewModel by viewModels { @@ -27,30 +24,27 @@ class MomentCommentsFragment : ) { MomentViewModelFactory() } - private val inputManager: InputMethodManager by lazy { - requireActivity().getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager - } override fun onViewCreated( view: View, savedInstanceState: Bundle?, ) { momentId = arguments?.getLong(MOMENT_ID_KEY) ?: return - initAdapter() + setUpRecyclerView() setUpBinding() observeMomentViewModel() observeCommentsViewModel() } - private fun initAdapter() { + private fun setUpRecyclerView() { commentsAdapter = CommentsAdapter(commentsViewModel) binding.rvMomentComments.adapter = commentsAdapter + binding.rvMomentComments.itemAnimator = null } private fun setUpBinding() { binding.viewModel = commentsViewModel binding.commentHandler = commentsViewModel - binding.keyboardHandler = this } private fun observeMomentViewModel() { @@ -79,23 +73,6 @@ class MomentCommentsFragment : } } - override fun onScreenTouchEvent() { - requireParentFragment().view?.setOnTouchListener { _, _ -> - hideKeyboard() - false - } - } - - private fun hideKeyboard() { - requireActivity().currentFocus?.let { view -> - inputManager.hideSoftInputFromWindow( - view.windowToken, - InputMethodManager.HIDE_NOT_ALWAYS, - ) - view.clearFocus() - } - } - companion object { const val MOMENT_ID_KEY = "momentId" } diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/MomentCommentsViewModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/MomentCommentsViewModel.kt similarity index 83% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/MomentCommentsViewModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/MomentCommentsViewModel.kt index 790c80041..c9272bfec 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/MomentCommentsViewModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/MomentCommentsViewModel.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.moment.comments +package com.on.staccato.presentation.moment.comments import android.util.Log import androidx.lifecycle.LiveData @@ -6,15 +6,15 @@ import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.map import androidx.lifecycle.viewModelScope -import com.woowacourse.staccato.data.ApiResponseHandler.onException -import com.woowacourse.staccato.data.ApiResponseHandler.onServerError -import com.woowacourse.staccato.data.ApiResponseHandler.onSuccess -import com.woowacourse.staccato.data.dto.Status -import com.woowacourse.staccato.domain.model.NewComment -import com.woowacourse.staccato.domain.repository.CommentRepository -import com.woowacourse.staccato.presentation.common.MutableSingleLiveData -import com.woowacourse.staccato.presentation.common.SingleLiveData -import com.woowacourse.staccato.presentation.mapper.toCommentUiModel +import com.on.staccato.data.ApiResponseHandler.onException +import com.on.staccato.data.ApiResponseHandler.onServerError +import com.on.staccato.data.ApiResponseHandler.onSuccess +import com.on.staccato.data.dto.Status +import com.on.staccato.domain.model.NewComment +import com.on.staccato.domain.repository.CommentRepository +import com.on.staccato.presentation.common.MutableSingleLiveData +import com.on.staccato.presentation.common.SingleLiveData +import com.on.staccato.presentation.mapper.toCommentUiModel import kotlinx.coroutines.launch class MomentCommentsViewModel( diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/MomentCommentsViewModelFactory.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/MomentCommentsViewModelFactory.kt similarity index 69% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/MomentCommentsViewModelFactory.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/MomentCommentsViewModelFactory.kt index 5ccee1904..7aa1f03cc 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/MomentCommentsViewModelFactory.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/comments/MomentCommentsViewModelFactory.kt @@ -1,10 +1,10 @@ -package com.woowacourse.staccato.presentation.moment.comments +package com.on.staccato.presentation.moment.comments import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider -import com.woowacourse.staccato.data.StaccatoClient.commentApiService -import com.woowacourse.staccato.data.comment.CommentDefaultRepository -import com.woowacourse.staccato.data.comment.CommentRemoteDataSource +import com.on.staccato.data.StaccatoClient.commentApiService +import com.on.staccato.data.comment.CommentDefaultRepository +import com.on.staccato.data.comment.CommentRemoteDataSource class MomentCommentsViewModelFactory(private val momentId: Long) : ViewModelProvider.Factory { override fun create(modelClass: Class): T { diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/detail/MomentDetailUiModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/detail/MomentDetailUiModel.kt similarity index 81% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/detail/MomentDetailUiModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/detail/MomentDetailUiModel.kt index 749baff58..c83faa490 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/detail/MomentDetailUiModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/detail/MomentDetailUiModel.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.moment.detail +package com.on.staccato.presentation.moment.detail import java.time.LocalDateTime diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/detail/MomentDetailViewModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/detail/MomentDetailViewModel.kt similarity index 87% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/detail/MomentDetailViewModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/detail/MomentDetailViewModel.kt index c5b885d48..62fabf25e 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/detail/MomentDetailViewModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/detail/MomentDetailViewModel.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.moment.detail +package com.on.staccato.presentation.moment.detail import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/detail/ViewpagePhotoAdapter.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/detail/ViewpagePhotoAdapter.kt similarity index 90% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/detail/ViewpagePhotoAdapter.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/detail/ViewpagePhotoAdapter.kt index 01bc77c47..8359f6c10 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/detail/ViewpagePhotoAdapter.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/detail/ViewpagePhotoAdapter.kt @@ -1,10 +1,10 @@ -package com.woowacourse.staccato.presentation.moment.detail +package com.on.staccato.presentation.moment.detail import android.view.LayoutInflater import android.view.ViewGroup import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.ListAdapter -import com.woowacourse.staccato.databinding.ItemViewpagePhotoBinding +import com.on.staccato.databinding.ItemViewpagePhotoBinding class ViewpagePhotoAdapter : ListAdapter(diffUtil) { diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/detail/ViewpagePhotoViewHolder.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/detail/ViewpagePhotoViewHolder.kt similarity index 65% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/detail/ViewpagePhotoViewHolder.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/detail/ViewpagePhotoViewHolder.kt index 88ca75ed5..f99620f9e 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/detail/ViewpagePhotoViewHolder.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/detail/ViewpagePhotoViewHolder.kt @@ -1,7 +1,7 @@ -package com.woowacourse.staccato.presentation.moment.detail +package com.on.staccato.presentation.moment.detail import androidx.recyclerview.widget.RecyclerView -import com.woowacourse.staccato.databinding.ItemViewpagePhotoBinding +import com.on.staccato.databinding.ItemViewpagePhotoBinding class ViewpagePhotoViewHolder(private val binding: ItemViewpagePhotoBinding) : RecyclerView.ViewHolder(binding.root) { diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/feeling/FeelingHandler.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/feeling/FeelingHandler.kt similarity index 59% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/feeling/FeelingHandler.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/feeling/FeelingHandler.kt index 524e48d29..8f2bf21a7 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/feeling/FeelingHandler.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/feeling/FeelingHandler.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.moment.feeling +package com.on.staccato.presentation.moment.feeling interface FeelingHandler { fun onFeelingClicked(selectedFeeling: FeelingUiModel) diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/feeling/FeelingSelectionAdapter.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/feeling/FeelingSelectionAdapter.kt similarity index 89% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/feeling/FeelingSelectionAdapter.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/feeling/FeelingSelectionAdapter.kt index 9f94b8044..41ebae8fd 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/feeling/FeelingSelectionAdapter.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/feeling/FeelingSelectionAdapter.kt @@ -1,13 +1,13 @@ -package com.woowacourse.staccato.presentation.moment.feeling +package com.on.staccato.presentation.moment.feeling import android.view.LayoutInflater import android.view.ViewGroup import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.ListAdapter import androidx.recyclerview.widget.RecyclerView -import com.woowacourse.staccato.databinding.ItemMomentFeelingSelectionBinding -import com.woowacourse.staccato.domain.model.Feeling -import com.woowacourse.staccato.presentation.mapper.toFeelingUiModel +import com.on.staccato.databinding.ItemMomentFeelingSelectionBinding +import com.on.staccato.domain.model.Feeling +import com.on.staccato.presentation.mapper.toFeelingUiModel class FeelingSelectionAdapter(private val feelingHandler: FeelingHandler) : ListAdapter(diffUtil) { diff --git a/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/feeling/FeelingUiModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/feeling/FeelingUiModel.kt new file mode 100644 index 000000000..a4857f805 --- /dev/null +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/feeling/FeelingUiModel.kt @@ -0,0 +1,8 @@ +package com.on.staccato.presentation.moment.feeling + +data class FeelingUiModel( + val feeling: String, + val colorSrc: Int?, + val graySrc: Int?, + val isSelected: Boolean = false, +) diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/feeling/MomentFeelingSelectionFragment.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/feeling/MomentFeelingSelectionFragment.kt similarity index 79% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/feeling/MomentFeelingSelectionFragment.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/feeling/MomentFeelingSelectionFragment.kt index 441bff5f0..31cfc5019 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/feeling/MomentFeelingSelectionFragment.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/feeling/MomentFeelingSelectionFragment.kt @@ -1,13 +1,13 @@ -package com.woowacourse.staccato.presentation.moment.feeling +package com.on.staccato.presentation.moment.feeling import android.os.Bundle import android.view.View import androidx.fragment.app.viewModels -import com.woowacourse.staccato.R -import com.woowacourse.staccato.databinding.FragmentMomentFeelingSelectionBinding -import com.woowacourse.staccato.presentation.base.BindingFragment -import com.woowacourse.staccato.presentation.moment.viewmodel.MomentViewModel -import com.woowacourse.staccato.presentation.moment.viewmodel.MomentViewModelFactory +import com.on.staccato.R +import com.on.staccato.databinding.FragmentMomentFeelingSelectionBinding +import com.on.staccato.presentation.base.BindingFragment +import com.on.staccato.presentation.moment.viewmodel.MomentViewModel +import com.on.staccato.presentation.moment.viewmodel.MomentViewModelFactory import kotlin.properties.Delegates class MomentFeelingSelectionFragment : diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/feeling/MomentFeelingSelectionViewModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/feeling/MomentFeelingSelectionViewModel.kt similarity index 88% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/feeling/MomentFeelingSelectionViewModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/feeling/MomentFeelingSelectionViewModel.kt index a07f1ddba..4234614d9 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/feeling/MomentFeelingSelectionViewModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/feeling/MomentFeelingSelectionViewModel.kt @@ -1,12 +1,12 @@ -package com.woowacourse.staccato.presentation.moment.feeling +package com.on.staccato.presentation.moment.feeling import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.woowacourse.staccato.domain.model.Feeling -import com.woowacourse.staccato.domain.repository.MomentRepository -import com.woowacourse.staccato.presentation.mapper.toFeelingUiModel +import com.on.staccato.domain.model.Feeling +import com.on.staccato.domain.repository.MomentRepository +import com.on.staccato.presentation.mapper.toFeelingUiModel import kotlinx.coroutines.launch class MomentFeelingSelectionViewModel( diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/feeling/MomentFeelingSelectionViewModelFactory.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/feeling/MomentFeelingSelectionViewModelFactory.kt similarity index 70% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/feeling/MomentFeelingSelectionViewModelFactory.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/feeling/MomentFeelingSelectionViewModelFactory.kt index 29bf78abf..7ad061539 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/feeling/MomentFeelingSelectionViewModelFactory.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/feeling/MomentFeelingSelectionViewModelFactory.kt @@ -1,10 +1,10 @@ -package com.woowacourse.staccato.presentation.moment.feeling +package com.on.staccato.presentation.moment.feeling import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider -import com.woowacourse.staccato.data.StaccatoClient.momentApiService -import com.woowacourse.staccato.data.moment.MomentDefaultRepository -import com.woowacourse.staccato.data.moment.MomentRemoteDataSource +import com.on.staccato.data.StaccatoClient.momentApiService +import com.on.staccato.data.moment.MomentDefaultRepository +import com.on.staccato.data.moment.MomentRemoteDataSource class MomentFeelingSelectionViewModelFactory(private val momentId: Long) : ViewModelProvider.Factory { diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/model/MomentDetailUiModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/model/MomentDetailUiModel.kt similarity index 89% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/model/MomentDetailUiModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/model/MomentDetailUiModel.kt index 408746d19..acc84981f 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/model/MomentDetailUiModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/model/MomentDetailUiModel.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.moment.model +package com.on.staccato.presentation.moment.model import java.time.LocalDateTime diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/viewmodel/MomentViewModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/viewmodel/MomentViewModel.kt similarity index 72% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/viewmodel/MomentViewModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/viewmodel/MomentViewModel.kt index fa54be992..9c623aa45 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/viewmodel/MomentViewModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/viewmodel/MomentViewModel.kt @@ -1,17 +1,17 @@ -package com.woowacourse.staccato.presentation.moment.viewmodel +package com.on.staccato.presentation.moment.viewmodel import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.woowacourse.staccato.domain.model.Feeling -import com.woowacourse.staccato.domain.repository.MomentRepository -import com.woowacourse.staccato.presentation.common.MutableSingleLiveData -import com.woowacourse.staccato.presentation.common.SingleLiveData -import com.woowacourse.staccato.presentation.mapper.toCommentUiModel -import com.woowacourse.staccato.presentation.mapper.toMomentDetailUiModel -import com.woowacourse.staccato.presentation.moment.comments.CommentUiModel -import com.woowacourse.staccato.presentation.moment.detail.MomentDetailUiModel +import com.on.staccato.domain.model.Feeling +import com.on.staccato.domain.repository.MomentRepository +import com.on.staccato.presentation.common.MutableSingleLiveData +import com.on.staccato.presentation.common.SingleLiveData +import com.on.staccato.presentation.mapper.toCommentUiModel +import com.on.staccato.presentation.mapper.toMomentDetailUiModel +import com.on.staccato.presentation.moment.comments.CommentUiModel +import com.on.staccato.presentation.moment.detail.MomentDetailUiModel import kotlinx.coroutines.launch class MomentViewModel(private val momentRepository: MomentRepository) : ViewModel() { diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/viewmodel/MomentViewModelFactory.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/viewmodel/MomentViewModelFactory.kt similarity index 66% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/viewmodel/MomentViewModelFactory.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/viewmodel/MomentViewModelFactory.kt index 71bab6301..b7ed8c01f 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/viewmodel/MomentViewModelFactory.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/moment/viewmodel/MomentViewModelFactory.kt @@ -1,10 +1,10 @@ -package com.woowacourse.staccato.presentation.moment.viewmodel +package com.on.staccato.presentation.moment.viewmodel import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider -import com.woowacourse.staccato.data.StaccatoClient.momentApiService -import com.woowacourse.staccato.data.moment.MomentDefaultRepository -import com.woowacourse.staccato.data.moment.MomentRemoteDataSource +import com.on.staccato.data.StaccatoClient.momentApiService +import com.on.staccato.data.moment.MomentDefaultRepository +import com.on.staccato.data.moment.MomentRemoteDataSource class MomentViewModelFactory : ViewModelProvider.Factory { override fun create(modelClass: Class): T { diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/MomentCreationActivity.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/MomentCreationActivity.kt similarity index 90% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/MomentCreationActivity.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/MomentCreationActivity.kt index aaa066ece..f5027d4de 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/MomentCreationActivity.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/MomentCreationActivity.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.momentcreation +package com.on.staccato.presentation.momentcreation import android.Manifest.permission.ACCESS_COARSE_LOCATION import android.Manifest.permission.ACCESS_FINE_LOCATION @@ -28,20 +28,20 @@ import com.google.android.gms.location.FusedLocationProviderClient import com.google.android.gms.location.LocationRequest import com.google.android.gms.location.LocationServices import com.google.android.material.snackbar.Snackbar -import com.woowacourse.staccato.R -import com.woowacourse.staccato.databinding.ActivityVisitCreationBinding -import com.woowacourse.staccato.presentation.base.BindingActivity -import com.woowacourse.staccato.presentation.common.PhotoAttachFragment -import com.woowacourse.staccato.presentation.memory.MemoryFragment.Companion.MEMORY_ID_KEY -import com.woowacourse.staccato.presentation.moment.MomentFragment.Companion.MOMENT_ID_KEY -import com.woowacourse.staccato.presentation.momentcreation.adapter.PhotoAttachAdapter -import com.woowacourse.staccato.presentation.momentcreation.dialog.MemorySelectionFragment -import com.woowacourse.staccato.presentation.momentcreation.model.AttachedPhotoUiModel -import com.woowacourse.staccato.presentation.momentcreation.viewmodel.MomentCreationViewModel -import com.woowacourse.staccato.presentation.momentcreation.viewmodel.MomentCreationViewModelFactory -import com.woowacourse.staccato.presentation.util.showToast -import com.woowacourse.staccato.presentation.visitcreation.adapter.AttachedPhotoItemTouchHelperCallback -import com.woowacourse.staccato.presentation.visitcreation.adapter.ItemDragListener +import com.on.staccato.R +import com.on.staccato.databinding.ActivityVisitCreationBinding +import com.on.staccato.presentation.base.BindingActivity +import com.on.staccato.presentation.common.PhotoAttachFragment +import com.on.staccato.presentation.memory.MemoryFragment.Companion.MEMORY_ID_KEY +import com.on.staccato.presentation.moment.MomentFragment.Companion.MOMENT_ID_KEY +import com.on.staccato.presentation.momentcreation.adapter.PhotoAttachAdapter +import com.on.staccato.presentation.momentcreation.dialog.MemorySelectionFragment +import com.on.staccato.presentation.momentcreation.model.AttachedPhotoUiModel +import com.on.staccato.presentation.momentcreation.viewmodel.MomentCreationViewModel +import com.on.staccato.presentation.momentcreation.viewmodel.MomentCreationViewModelFactory +import com.on.staccato.presentation.util.showToast +import com.on.staccato.presentation.visitcreation.adapter.AttachedPhotoItemTouchHelperCallback +import com.on.staccato.presentation.visitcreation.adapter.ItemDragListener import java.time.LocalDateTime class MomentCreationActivity : diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/MomentCreationHandler.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/MomentCreationHandler.kt similarity index 62% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/MomentCreationHandler.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/MomentCreationHandler.kt index 9872e89fc..0ef17e4d3 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/MomentCreationHandler.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/MomentCreationHandler.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.momentcreation +package com.on.staccato.presentation.momentcreation interface MomentCreationHandler { fun onCreateDoneClicked() diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/OnUrisSelectedListener.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/OnUrisSelectedListener.kt similarity index 62% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/OnUrisSelectedListener.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/OnUrisSelectedListener.kt index 7b74785aa..50b5d3d66 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/OnUrisSelectedListener.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/OnUrisSelectedListener.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.momentcreation +package com.on.staccato.presentation.momentcreation import android.net.Uri diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/adapter/PhotoAttachAdapter.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/adapter/PhotoAttachAdapter.kt similarity index 86% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/adapter/PhotoAttachAdapter.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/adapter/PhotoAttachAdapter.kt index 83c2efdd6..b04c888ee 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/adapter/PhotoAttachAdapter.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/adapter/PhotoAttachAdapter.kt @@ -1,15 +1,15 @@ -package com.woowacourse.staccato.presentation.momentcreation.adapter +package com.on.staccato.presentation.momentcreation.adapter import android.view.LayoutInflater import android.view.ViewGroup import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.ListAdapter -import com.woowacourse.staccato.databinding.ItemAddPhotoBinding -import com.woowacourse.staccato.databinding.ItemAttachedPhotoBinding -import com.woowacourse.staccato.presentation.common.AttachedPhotoHandler -import com.woowacourse.staccato.presentation.momentcreation.model.AttachedPhotoUiModel -import com.woowacourse.staccato.presentation.visitcreation.adapter.ItemDragListener -import com.woowacourse.staccato.presentation.visitcreation.adapter.ItemMoveListener +import com.on.staccato.databinding.ItemAddPhotoBinding +import com.on.staccato.databinding.ItemAttachedPhotoBinding +import com.on.staccato.presentation.common.AttachedPhotoHandler +import com.on.staccato.presentation.momentcreation.model.AttachedPhotoUiModel +import com.on.staccato.presentation.visitcreation.adapter.ItemDragListener +import com.on.staccato.presentation.visitcreation.adapter.ItemMoveListener class PhotoAttachAdapter( private val dragListener: ItemDragListener, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/adapter/PhotoAttachViewHolder.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/adapter/PhotoAttachViewHolder.kt similarity index 72% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/adapter/PhotoAttachViewHolder.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/adapter/PhotoAttachViewHolder.kt index 716a85acf..e064c14a4 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/adapter/PhotoAttachViewHolder.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/adapter/PhotoAttachViewHolder.kt @@ -1,13 +1,13 @@ -package com.woowacourse.staccato.presentation.momentcreation.adapter +package com.on.staccato.presentation.momentcreation.adapter import android.view.MotionEvent import androidx.databinding.ViewDataBinding import androidx.recyclerview.widget.RecyclerView -import com.woowacourse.staccato.databinding.ItemAddPhotoBinding -import com.woowacourse.staccato.databinding.ItemAttachedPhotoBinding -import com.woowacourse.staccato.presentation.common.AttachedPhotoHandler -import com.woowacourse.staccato.presentation.momentcreation.model.AttachedPhotoUiModel -import com.woowacourse.staccato.presentation.visitcreation.adapter.ItemDragListener +import com.on.staccato.databinding.ItemAddPhotoBinding +import com.on.staccato.databinding.ItemAttachedPhotoBinding +import com.on.staccato.presentation.common.AttachedPhotoHandler +import com.on.staccato.presentation.momentcreation.model.AttachedPhotoUiModel +import com.on.staccato.presentation.visitcreation.adapter.ItemDragListener sealed class PhotoAttachViewHolder(binding: ViewDataBinding) : RecyclerView.ViewHolder(binding.root) { diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/dialog/MemorySelectionFragment.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/dialog/MemorySelectionFragment.kt similarity index 89% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/dialog/MemorySelectionFragment.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/dialog/MemorySelectionFragment.kt index 14f7e03df..611f6a453 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/dialog/MemorySelectionFragment.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/dialog/MemorySelectionFragment.kt @@ -1,12 +1,12 @@ -package com.woowacourse.staccato.presentation.momentcreation.dialog +package com.on.staccato.presentation.momentcreation.dialog import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import com.google.android.material.bottomsheet.BottomSheetDialogFragment -import com.woowacourse.staccato.databinding.FragmentMemorySelectionBinding -import com.woowacourse.staccato.domain.model.MemoryCandidate +import com.on.staccato.databinding.FragmentMemorySelectionBinding +import com.on.staccato.domain.model.MemoryCandidate class MemorySelectionFragment : BottomSheetDialogFragment() { private var _binding: FragmentMemorySelectionBinding? = null diff --git a/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/dialog/MemorySelectionHandler.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/dialog/MemorySelectionHandler.kt new file mode 100644 index 000000000..0a6c63353 --- /dev/null +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/dialog/MemorySelectionHandler.kt @@ -0,0 +1,7 @@ +package com.on.staccato.presentation.momentcreation.dialog + +import com.on.staccato.domain.model.MemoryCandidate + +fun interface MemorySelectionHandler { + fun onConfirmClicked(memoryUiModel: MemoryCandidate) +} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/dialog/VisitedAtSelectionFragment.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/dialog/VisitedAtSelectionFragment.kt similarity index 92% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/dialog/VisitedAtSelectionFragment.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/dialog/VisitedAtSelectionFragment.kt index af1e8369e..948c12797 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/dialog/VisitedAtSelectionFragment.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/dialog/VisitedAtSelectionFragment.kt @@ -1,11 +1,11 @@ -package com.woowacourse.staccato.presentation.momentcreation.dialog +package com.on.staccato.presentation.momentcreation.dialog import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import com.google.android.material.bottomsheet.BottomSheetDialogFragment -import com.woowacourse.staccato.databinding.FragmentVisitedAtSelectionBinding +import com.on.staccato.databinding.FragmentVisitedAtSelectionBinding import java.time.LocalDate class VisitedAtSelectionFragment : BottomSheetDialogFragment() { diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/dialog/VisitedAtSelectionHandler.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/dialog/VisitedAtSelectionHandler.kt similarity index 63% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/dialog/VisitedAtSelectionHandler.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/dialog/VisitedAtSelectionHandler.kt index 3937f499e..6a64e2371 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/dialog/VisitedAtSelectionHandler.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/dialog/VisitedAtSelectionHandler.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.momentcreation.dialog +package com.on.staccato.presentation.momentcreation.dialog import java.time.LocalDate diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/model/AttachedPhotoUiModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/model/AttachedPhotoUiModel.kt similarity index 61% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/model/AttachedPhotoUiModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/model/AttachedPhotoUiModel.kt index dc3818f70..26aace123 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/model/AttachedPhotoUiModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/model/AttachedPhotoUiModel.kt @@ -1,8 +1,8 @@ -package com.woowacourse.staccato.presentation.momentcreation.model +package com.on.staccato.presentation.momentcreation.model import android.net.Uri -import com.woowacourse.staccato.presentation.momentcreation.adapter.PhotoAttachAdapter.Companion.ADD_PHOTO_BUTTON_URI -import com.woowacourse.staccato.presentation.momentcreation.adapter.PhotoAttachAdapter.Companion.ADD_PHOTO_BUTTON_URL +import com.on.staccato.presentation.momentcreation.adapter.PhotoAttachAdapter.Companion.ADD_PHOTO_BUTTON_URI +import com.on.staccato.presentation.momentcreation.adapter.PhotoAttachAdapter.Companion.ADD_PHOTO_BUTTON_URL data class AttachedPhotoUiModel( val uri: Uri? = null, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/model/AttachedPhotosUiModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/model/AttachedPhotosUiModel.kt similarity index 96% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/model/AttachedPhotosUiModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/model/AttachedPhotosUiModel.kt index b9d5666d6..59dcfde21 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/model/AttachedPhotosUiModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/model/AttachedPhotosUiModel.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.momentcreation.model +package com.on.staccato.presentation.momentcreation.model import android.net.Uri diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/viewmodel/MomentCreationViewModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/viewmodel/MomentCreationViewModel.kt similarity index 87% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/viewmodel/MomentCreationViewModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/viewmodel/MomentCreationViewModel.kt index ff0a75253..fa711a8c8 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/viewmodel/MomentCreationViewModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/viewmodel/MomentCreationViewModel.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.momentcreation.viewmodel +package com.on.staccato.presentation.momentcreation.viewmodel import android.content.Context import android.location.Location @@ -8,19 +8,19 @@ import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.woowacourse.staccato.data.ApiResponseHandler.onException -import com.woowacourse.staccato.data.ApiResponseHandler.onSuccess -import com.woowacourse.staccato.data.image.ImageDefaultRepository -import com.woowacourse.staccato.domain.model.MemoryCandidate -import com.woowacourse.staccato.domain.model.MemoryCandidates -import com.woowacourse.staccato.domain.repository.MemoryRepository -import com.woowacourse.staccato.domain.repository.MomentRepository -import com.woowacourse.staccato.presentation.common.AttachedPhotoHandler -import com.woowacourse.staccato.presentation.common.MutableSingleLiveData -import com.woowacourse.staccato.presentation.common.SingleLiveData -import com.woowacourse.staccato.presentation.momentcreation.model.AttachedPhotoUiModel -import com.woowacourse.staccato.presentation.momentcreation.model.AttachedPhotosUiModel -import com.woowacourse.staccato.presentation.util.convertExcretaFile +import com.on.staccato.data.ApiResponseHandler.onException +import com.on.staccato.data.ApiResponseHandler.onSuccess +import com.on.staccato.data.image.ImageDefaultRepository +import com.on.staccato.domain.model.MemoryCandidate +import com.on.staccato.domain.model.MemoryCandidates +import com.on.staccato.domain.repository.MemoryRepository +import com.on.staccato.domain.repository.MomentRepository +import com.on.staccato.presentation.common.AttachedPhotoHandler +import com.on.staccato.presentation.common.MutableSingleLiveData +import com.on.staccato.presentation.common.SingleLiveData +import com.on.staccato.presentation.momentcreation.model.AttachedPhotoUiModel +import com.on.staccato.presentation.momentcreation.model.AttachedPhotosUiModel +import com.on.staccato.presentation.util.convertExcretaFile import kotlinx.coroutines.CoroutineExceptionHandler import kotlinx.coroutines.Job import kotlinx.coroutines.async diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/viewmodel/MomentCreationViewModelFactory.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/viewmodel/MomentCreationViewModelFactory.kt similarity index 57% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/viewmodel/MomentCreationViewModelFactory.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/viewmodel/MomentCreationViewModelFactory.kt index 68012c470..dfdde605e 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/viewmodel/MomentCreationViewModelFactory.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/momentcreation/viewmodel/MomentCreationViewModelFactory.kt @@ -1,15 +1,15 @@ -package com.woowacourse.staccato.presentation.momentcreation.viewmodel +package com.on.staccato.presentation.momentcreation.viewmodel import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider -import com.woowacourse.staccato.data.StaccatoClient.imageApiService -import com.woowacourse.staccato.data.StaccatoClient.memoryApiService -import com.woowacourse.staccato.data.StaccatoClient.momentApiService -import com.woowacourse.staccato.data.image.ImageDefaultRepository -import com.woowacourse.staccato.data.memory.MemoryDefaultRepository -import com.woowacourse.staccato.data.memory.MemoryRemoteDataSource -import com.woowacourse.staccato.data.moment.MomentDefaultRepository -import com.woowacourse.staccato.data.moment.MomentRemoteDataSource +import com.on.staccato.data.StaccatoClient.imageApiService +import com.on.staccato.data.StaccatoClient.memoryApiService +import com.on.staccato.data.StaccatoClient.momentApiService +import com.on.staccato.data.image.ImageDefaultRepository +import com.on.staccato.data.memory.MemoryDefaultRepository +import com.on.staccato.data.memory.MemoryRemoteDataSource +import com.on.staccato.data.moment.MomentDefaultRepository +import com.on.staccato.data.moment.MomentRemoteDataSource class MomentCreationViewModelFactory : ViewModelProvider.Factory { override fun create(modelClass: Class): T { diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/TimelineFragment.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/TimelineFragment.kt similarity index 73% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/TimelineFragment.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/TimelineFragment.kt index 086d75ffd..9bea3cf3a 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/TimelineFragment.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/TimelineFragment.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.timeline +package com.on.staccato.presentation.timeline import android.os.Bundle import android.view.View @@ -6,17 +6,17 @@ import androidx.core.os.bundleOf import androidx.fragment.app.activityViewModels import androidx.fragment.app.viewModels import androidx.navigation.fragment.findNavController -import com.woowacourse.staccato.R -import com.woowacourse.staccato.databinding.FragmentTimelineBinding -import com.woowacourse.staccato.presentation.base.BindingFragment -import com.woowacourse.staccato.presentation.main.MainActivity -import com.woowacourse.staccato.presentation.main.SharedViewModel -import com.woowacourse.staccato.presentation.memory.MemoryFragment.Companion.MEMORY_ID_KEY -import com.woowacourse.staccato.presentation.memorycreation.MemoryCreationActivity -import com.woowacourse.staccato.presentation.timeline.adapter.TimelineAdapter -import com.woowacourse.staccato.presentation.timeline.model.TimelineUiModel -import com.woowacourse.staccato.presentation.timeline.viewmodel.TimelineViewModel -import com.woowacourse.staccato.presentation.util.showToast +import com.on.staccato.R +import com.on.staccato.databinding.FragmentTimelineBinding +import com.on.staccato.presentation.base.BindingFragment +import com.on.staccato.presentation.main.MainActivity +import com.on.staccato.presentation.main.SharedViewModel +import com.on.staccato.presentation.memory.MemoryFragment.Companion.MEMORY_ID_KEY +import com.on.staccato.presentation.memorycreation.MemoryCreationActivity +import com.on.staccato.presentation.timeline.adapter.TimelineAdapter +import com.on.staccato.presentation.timeline.model.TimelineUiModel +import com.on.staccato.presentation.timeline.viewmodel.TimelineViewModel +import com.on.staccato.presentation.util.showToast class TimelineFragment : BindingFragment(R.layout.fragment_timeline), @@ -47,6 +47,10 @@ class TimelineFragment : ) } + override fun onSortClicked() { + showToast(getString(R.string.all_default_not_supported)) + } + private fun navigateToMemory(bundle: Bundle) { findNavController().navigate(R.id.action_timelineFragment_to_memoryFragment, bundle) } @@ -76,10 +80,12 @@ class TimelineFragment : private fun checkTimelineEmpty(timeline: List) { // TODO: data binding 으로 가시성 설정되지 않는 오류 해결하기 if (timeline.isEmpty()) { + binding.frameTimelineAddMemory.visibility = View.GONE binding.ivTimelineEmpty.visibility = View.VISIBLE binding.tvTimelineEmpty.visibility = View.VISIBLE binding.btnTimelineCreateMemory.visibility = View.VISIBLE } else { + binding.frameTimelineAddMemory.visibility = View.VISIBLE binding.ivTimelineEmpty.visibility = View.GONE binding.tvTimelineEmpty.visibility = View.GONE binding.btnTimelineCreateMemory.visibility = View.GONE diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/TimelineHandler.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/TimelineHandler.kt similarity index 59% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/TimelineHandler.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/TimelineHandler.kt index 1c0310e18..cca0fa725 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/TimelineHandler.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/TimelineHandler.kt @@ -1,7 +1,9 @@ -package com.woowacourse.staccato.presentation.timeline +package com.on.staccato.presentation.timeline interface TimelineHandler { fun onMemoryClicked(memoryId: Long) fun onMemoryCreationClicked() + + fun onSortClicked() } diff --git a/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/adapter/TimelineAdapter.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/adapter/TimelineAdapter.kt new file mode 100644 index 000000000..aa0c2b6bc --- /dev/null +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/adapter/TimelineAdapter.kt @@ -0,0 +1,51 @@ +package com.on.staccato.presentation.timeline.adapter + +import android.view.LayoutInflater +import android.view.ViewGroup +import androidx.recyclerview.widget.DiffUtil +import androidx.recyclerview.widget.ListAdapter +import com.on.staccato.databinding.ItemTimelineBinding +import com.on.staccato.presentation.timeline.TimelineHandler +import com.on.staccato.presentation.timeline.model.TimelineUiModel + +class TimelineAdapter(private val eventHandler: TimelineHandler) : + ListAdapter(diffUtil) { + override fun onCreateViewHolder( + parent: ViewGroup, + viewType: Int, + ): TimelineViewHolder { + val binding = + ItemTimelineBinding.inflate( + LayoutInflater.from(parent.context), + parent, + false, + ) + return TimelineViewHolder(binding, eventHandler) + } + + override fun onBindViewHolder( + holder: TimelineViewHolder, + position: Int, + ) { + holder.bind(currentList[position]) + } + + fun updateTimeline(newTimeline: List) { + submitList(newTimeline) + } + + companion object { + val diffUtil = + object : DiffUtil.ItemCallback() { + override fun areContentsTheSame( + oldItem: TimelineUiModel, + newItem: TimelineUiModel, + ): Boolean = oldItem == newItem + + override fun areItemsTheSame( + oldItem: TimelineUiModel, + newItem: TimelineUiModel, + ): Boolean = oldItem.memoryId == newItem.memoryId + } + } +} diff --git a/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/adapter/TimelineViewHolder.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/adapter/TimelineViewHolder.kt new file mode 100644 index 000000000..d5c4681b0 --- /dev/null +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/adapter/TimelineViewHolder.kt @@ -0,0 +1,16 @@ +package com.on.staccato.presentation.timeline.adapter + +import androidx.recyclerview.widget.RecyclerView +import com.on.staccato.databinding.ItemTimelineBinding +import com.on.staccato.presentation.timeline.TimelineHandler +import com.on.staccato.presentation.timeline.model.TimelineUiModel + +class TimelineViewHolder( + private val binding: ItemTimelineBinding, + private val eventHandler: TimelineHandler, +) : RecyclerView.ViewHolder(binding.root) { + fun bind(item: TimelineUiModel) { + binding.memory = item + binding.eventHandler = eventHandler + } +} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/model/TimelineUiModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/model/TimelineUiModel.kt similarity index 77% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/model/TimelineUiModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/model/TimelineUiModel.kt index e58008073..a548d8043 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/model/TimelineUiModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/model/TimelineUiModel.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.timeline.model +package com.on.staccato.presentation.timeline.model import java.time.LocalDate diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/viewmodel/TimelineViewModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/viewmodel/TimelineViewModel.kt similarity index 74% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/viewmodel/TimelineViewModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/viewmodel/TimelineViewModel.kt index 9ec4cf1a2..6a8fa8046 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/viewmodel/TimelineViewModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/viewmodel/TimelineViewModel.kt @@ -1,21 +1,21 @@ -package com.woowacourse.staccato.presentation.timeline.viewmodel +package com.on.staccato.presentation.timeline.viewmodel import android.util.Log import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.woowacourse.staccato.data.ApiResponseHandler.onException -import com.woowacourse.staccato.data.ApiResponseHandler.onServerError -import com.woowacourse.staccato.data.ApiResponseHandler.onSuccess -import com.woowacourse.staccato.data.dto.Status -import com.woowacourse.staccato.data.timeline.TimelineDefaultRepository -import com.woowacourse.staccato.domain.model.Timeline -import com.woowacourse.staccato.domain.repository.TimelineRepository -import com.woowacourse.staccato.presentation.common.MutableSingleLiveData -import com.woowacourse.staccato.presentation.common.SingleLiveData -import com.woowacourse.staccato.presentation.mapper.toTimelineUiModel -import com.woowacourse.staccato.presentation.timeline.model.TimelineUiModel +import com.on.staccato.data.ApiResponseHandler.onException +import com.on.staccato.data.ApiResponseHandler.onServerError +import com.on.staccato.data.ApiResponseHandler.onSuccess +import com.on.staccato.data.dto.Status +import com.on.staccato.data.timeline.TimelineDefaultRepository +import com.on.staccato.domain.model.Timeline +import com.on.staccato.domain.repository.TimelineRepository +import com.on.staccato.presentation.common.MutableSingleLiveData +import com.on.staccato.presentation.common.SingleLiveData +import com.on.staccato.presentation.mapper.toTimelineUiModel +import com.on.staccato.presentation.timeline.model.TimelineUiModel import kotlinx.coroutines.CoroutineExceptionHandler import kotlinx.coroutines.launch diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/viewmodel/TimelineViewModelFactory.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/viewmodel/TimelineViewModelFactory.kt similarity index 73% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/viewmodel/TimelineViewModelFactory.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/viewmodel/TimelineViewModelFactory.kt index 28e5a5d42..ad4a5bea9 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/viewmodel/TimelineViewModelFactory.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/timeline/viewmodel/TimelineViewModelFactory.kt @@ -1,9 +1,9 @@ -package com.woowacourse.staccato.presentation.timeline.viewmodel +package com.on.staccato.presentation.timeline.viewmodel import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider -import com.woowacourse.staccato.data.timeline.TimelineDefaultRepository -import com.woowacourse.staccato.domain.repository.TimelineRepository +import com.on.staccato.data.timeline.TimelineDefaultRepository +import com.on.staccato.domain.repository.TimelineRepository class TimelineViewModelFactory( private val timelineRepository: TimelineRepository = TimelineDefaultRepository(), diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/util/FileUtils.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/util/FileUtils.kt similarity index 97% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/util/FileUtils.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/util/FileUtils.kt index 24d8d8ceb..4962a643e 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/util/FileUtils.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/util/FileUtils.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.util +package com.on.staccato.presentation.util import android.content.ContentResolver import android.content.Context diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/util/MessageUtils.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/util/MessageUtils.kt similarity index 90% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/util/MessageUtils.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/util/MessageUtils.kt index 4d72ff131..47328701c 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/util/MessageUtils.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/util/MessageUtils.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.util +package com.on.staccato.presentation.util import android.content.Context import android.view.View diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitcreation/adapter/AttachedPhotoItemTouchHelperCallback.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitcreation/adapter/AttachedPhotoItemTouchHelperCallback.kt similarity index 90% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitcreation/adapter/AttachedPhotoItemTouchHelperCallback.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitcreation/adapter/AttachedPhotoItemTouchHelperCallback.kt index e57aeb4b7..967bbb70a 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitcreation/adapter/AttachedPhotoItemTouchHelperCallback.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitcreation/adapter/AttachedPhotoItemTouchHelperCallback.kt @@ -1,8 +1,8 @@ -package com.woowacourse.staccato.presentation.visitcreation.adapter +package com.on.staccato.presentation.visitcreation.adapter import androidx.recyclerview.widget.ItemTouchHelper import androidx.recyclerview.widget.RecyclerView -import com.woowacourse.staccato.presentation.momentcreation.adapter.PhotoAttachViewHolder +import com.on.staccato.presentation.momentcreation.adapter.PhotoAttachViewHolder class AttachedPhotoItemTouchHelperCallback( private val moveListener: ItemMoveListener, diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitcreation/adapter/ItemDragListener.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitcreation/adapter/ItemDragListener.kt similarity index 55% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitcreation/adapter/ItemDragListener.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitcreation/adapter/ItemDragListener.kt index 1387a3597..ae3aa42e8 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitcreation/adapter/ItemDragListener.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitcreation/adapter/ItemDragListener.kt @@ -1,7 +1,7 @@ -package com.woowacourse.staccato.presentation.visitcreation.adapter +package com.on.staccato.presentation.visitcreation.adapter import androidx.recyclerview.widget.RecyclerView -import com.woowacourse.staccato.presentation.momentcreation.model.AttachedPhotoUiModel +import com.on.staccato.presentation.momentcreation.model.AttachedPhotoUiModel interface ItemDragListener { fun onStartDrag(viewHolder: RecyclerView.ViewHolder) diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitcreation/adapter/ItemMoveListener.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitcreation/adapter/ItemMoveListener.kt similarity index 63% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitcreation/adapter/ItemMoveListener.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitcreation/adapter/ItemMoveListener.kt index cdf6432bf..d6c8a283c 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitcreation/adapter/ItemMoveListener.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitcreation/adapter/ItemMoveListener.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.visitcreation.adapter +package com.on.staccato.presentation.visitcreation.adapter interface ItemMoveListener { fun onItemMove( diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitupdate/VisitUpdateActivity.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitupdate/VisitUpdateActivity.kt similarity index 82% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitupdate/VisitUpdateActivity.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitupdate/VisitUpdateActivity.kt index 164e2503d..2ba1d08ee 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitupdate/VisitUpdateActivity.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitupdate/VisitUpdateActivity.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.visitupdate +package com.on.staccato.presentation.visitupdate import android.content.Context import android.content.Intent @@ -13,21 +13,21 @@ import androidx.activity.viewModels import androidx.fragment.app.FragmentManager import androidx.recyclerview.widget.ItemTouchHelper import androidx.recyclerview.widget.RecyclerView -import com.woowacourse.staccato.R -import com.woowacourse.staccato.databinding.ActivityVisitUpdateBinding -import com.woowacourse.staccato.presentation.base.BindingActivity -import com.woowacourse.staccato.presentation.common.PhotoAttachFragment -import com.woowacourse.staccato.presentation.memory.MemoryFragment.Companion.MEMORY_ID_KEY -import com.woowacourse.staccato.presentation.memory.MemoryFragment.Companion.MEMORY_TITLE_KEY -import com.woowacourse.staccato.presentation.moment.MomentFragment.Companion.MOMENT_ID_KEY -import com.woowacourse.staccato.presentation.momentcreation.OnUrisSelectedListener -import com.woowacourse.staccato.presentation.momentcreation.adapter.PhotoAttachAdapter -import com.woowacourse.staccato.presentation.momentcreation.model.AttachedPhotoUiModel -import com.woowacourse.staccato.presentation.util.showToast -import com.woowacourse.staccato.presentation.visitcreation.adapter.AttachedPhotoItemTouchHelperCallback -import com.woowacourse.staccato.presentation.visitcreation.adapter.ItemDragListener -import com.woowacourse.staccato.presentation.visitupdate.viewmodel.VisitUpdateViewModel -import com.woowacourse.staccato.presentation.visitupdate.viewmodel.VisitUpdateViewModelFactory +import com.on.staccato.R +import com.on.staccato.databinding.ActivityVisitUpdateBinding +import com.on.staccato.presentation.base.BindingActivity +import com.on.staccato.presentation.common.PhotoAttachFragment +import com.on.staccato.presentation.memory.MemoryFragment.Companion.MEMORY_ID_KEY +import com.on.staccato.presentation.memory.MemoryFragment.Companion.MEMORY_TITLE_KEY +import com.on.staccato.presentation.moment.MomentFragment.Companion.MOMENT_ID_KEY +import com.on.staccato.presentation.momentcreation.OnUrisSelectedListener +import com.on.staccato.presentation.momentcreation.adapter.PhotoAttachAdapter +import com.on.staccato.presentation.momentcreation.model.AttachedPhotoUiModel +import com.on.staccato.presentation.util.showToast +import com.on.staccato.presentation.visitcreation.adapter.AttachedPhotoItemTouchHelperCallback +import com.on.staccato.presentation.visitcreation.adapter.ItemDragListener +import com.on.staccato.presentation.visitupdate.viewmodel.VisitUpdateViewModel +import com.on.staccato.presentation.visitupdate.viewmodel.VisitUpdateViewModelFactory class VisitUpdateActivity : BindingActivity(), diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitupdate/VisitUpdateHandler.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitupdate/VisitUpdateHandler.kt similarity index 52% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitupdate/VisitUpdateHandler.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitupdate/VisitUpdateHandler.kt index db10fcda4..9f63868a9 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitupdate/VisitUpdateHandler.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitupdate/VisitUpdateHandler.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.visitupdate +package com.on.staccato.presentation.visitupdate interface VisitUpdateHandler { fun onUpdateDoneClicked() diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitupdate/model/VisitUpdateDefaultUiModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitupdate/model/VisitUpdateDefaultUiModel.kt similarity index 70% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitupdate/model/VisitUpdateDefaultUiModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitupdate/model/VisitUpdateDefaultUiModel.kt index aa05a7c5c..87ab26f5d 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitupdate/model/VisitUpdateDefaultUiModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitupdate/model/VisitUpdateDefaultUiModel.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.visitupdate.model +package com.on.staccato.presentation.visitupdate.model import java.time.LocalDateTime diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitupdate/viewmodel/VisitUpdateViewModel.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitupdate/viewmodel/VisitUpdateViewModel.kt similarity index 83% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitupdate/viewmodel/VisitUpdateViewModel.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitupdate/viewmodel/VisitUpdateViewModel.kt index 48fcb8c98..e0202ce5f 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitupdate/viewmodel/VisitUpdateViewModel.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitupdate/viewmodel/VisitUpdateViewModel.kt @@ -1,4 +1,4 @@ -package com.woowacourse.staccato.presentation.visitupdate.viewmodel +package com.on.staccato.presentation.visitupdate.viewmodel import android.content.Context import android.net.Uri @@ -7,21 +7,21 @@ import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.woowacourse.staccato.data.ApiResponseHandler.onException -import com.woowacourse.staccato.data.ApiResponseHandler.onSuccess -import com.woowacourse.staccato.domain.model.MemoryCandidate -import com.woowacourse.staccato.domain.repository.ImageRepository -import com.woowacourse.staccato.domain.repository.MomentRepository -import com.woowacourse.staccato.presentation.common.AttachedPhotoHandler -import com.woowacourse.staccato.presentation.common.MutableSingleLiveData -import com.woowacourse.staccato.presentation.common.SingleLiveData -import com.woowacourse.staccato.presentation.mapper.toVisitUpdateDefaultUiModel -import com.woowacourse.staccato.presentation.momentcreation.model.AttachedPhotoUiModel -import com.woowacourse.staccato.presentation.momentcreation.model.AttachedPhotosUiModel -import com.woowacourse.staccato.presentation.momentcreation.model.AttachedPhotosUiModel.Companion.createPhotosByUrls -import com.woowacourse.staccato.presentation.momentcreation.viewmodel.MomentCreationViewModel -import com.woowacourse.staccato.presentation.util.convertExcretaFile -import com.woowacourse.staccato.presentation.visitupdate.model.VisitUpdateDefaultUiModel +import com.on.staccato.data.ApiResponseHandler.onException +import com.on.staccato.data.ApiResponseHandler.onSuccess +import com.on.staccato.domain.model.MemoryCandidate +import com.on.staccato.domain.repository.ImageRepository +import com.on.staccato.domain.repository.MomentRepository +import com.on.staccato.presentation.common.AttachedPhotoHandler +import com.on.staccato.presentation.common.MutableSingleLiveData +import com.on.staccato.presentation.common.SingleLiveData +import com.on.staccato.presentation.mapper.toVisitUpdateDefaultUiModel +import com.on.staccato.presentation.momentcreation.model.AttachedPhotoUiModel +import com.on.staccato.presentation.momentcreation.model.AttachedPhotosUiModel +import com.on.staccato.presentation.momentcreation.model.AttachedPhotosUiModel.Companion.createPhotosByUrls +import com.on.staccato.presentation.momentcreation.viewmodel.MomentCreationViewModel +import com.on.staccato.presentation.util.convertExcretaFile +import com.on.staccato.presentation.visitupdate.model.VisitUpdateDefaultUiModel import kotlinx.coroutines.CoroutineExceptionHandler import kotlinx.coroutines.Job import kotlinx.coroutines.async diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitupdate/viewmodel/VisitUpdateViewModelFactory.kt b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitupdate/viewmodel/VisitUpdateViewModelFactory.kt similarity index 68% rename from android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitupdate/viewmodel/VisitUpdateViewModelFactory.kt rename to android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitupdate/viewmodel/VisitUpdateViewModelFactory.kt index c4c3e05a3..12ed40edb 100644 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/visitupdate/viewmodel/VisitUpdateViewModelFactory.kt +++ b/android/Staccato_AN/app/src/main/java/com/on/staccato/presentation/visitupdate/viewmodel/VisitUpdateViewModelFactory.kt @@ -1,11 +1,11 @@ -package com.woowacourse.staccato.presentation.visitupdate.viewmodel +package com.on.staccato.presentation.visitupdate.viewmodel import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider -import com.woowacourse.staccato.data.StaccatoClient -import com.woowacourse.staccato.data.image.ImageDefaultRepository -import com.woowacourse.staccato.data.moment.MomentDefaultRepository -import com.woowacourse.staccato.data.moment.MomentRemoteDataSource +import com.on.staccato.data.StaccatoClient +import com.on.staccato.data.image.ImageDefaultRepository +import com.on.staccato.data.moment.MomentDefaultRepository +import com.on.staccato.data.moment.MomentRemoteDataSource class VisitUpdateViewModelFactory : ViewModelProvider.Factory { override fun create(modelClass: Class): T { diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/mapper/FeelingMapper.kt b/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/mapper/FeelingMapper.kt deleted file mode 100644 index 95298e357..000000000 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/mapper/FeelingMapper.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.woowacourse.staccato.data.dto.mapper - -import com.woowacourse.staccato.data.dto.moment.FeelingRequest -import com.woowacourse.staccato.domain.model.Feeling - -fun Feeling.toFeelingRequest(): FeelingRequest = - FeelingRequest( - feeling = value, - ) diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/mapper/MemberMapper.kt b/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/mapper/MemberMapper.kt deleted file mode 100644 index e6b3c4b4d..000000000 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/dto/mapper/MemberMapper.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.woowacourse.staccato.data.dto.mapper - -import com.woowacourse.staccato.data.dto.member.MemberDto -import com.woowacourse.staccato.domain.model.Member - -fun MemberDto.toDomain() = - Member( - memberId = memberId, - nickname = nickname, - memberImage = memberImage, - ) diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/login/LoginDataSource.kt b/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/login/LoginDataSource.kt deleted file mode 100644 index d53643303..000000000 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/login/LoginDataSource.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.woowacourse.staccato.data.login - -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.data.dto.login.NicknameLoginResponse - -interface LoginDataSource { - suspend fun requestLoginWithNickname(nickname: String): ResponseResult -} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/login/LoginRemoteDataSource.kt b/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/login/LoginRemoteDataSource.kt deleted file mode 100644 index 9ed737836..000000000 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/data/login/LoginRemoteDataSource.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.woowacourse.staccato.data.login - -import com.woowacourse.staccato.data.ApiResponseHandler.handleApiResponse -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.data.StaccatoClient -import com.woowacourse.staccato.data.dto.login.NicknameLoginRequest -import com.woowacourse.staccato.data.dto.login.NicknameLoginResponse - -class LoginRemoteDataSource( - private val loginApiService: LoginApiService = StaccatoClient.loginApiService, -) : LoginDataSource { - override suspend fun requestLoginWithNickname(nickname: String): ResponseResult = - handleApiResponse { loginApiService.postNicknameLogin(NicknameLoginRequest(nickname)) } -} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/repository/ImageRepository.kt b/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/repository/ImageRepository.kt deleted file mode 100644 index 4c12dac47..000000000 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/repository/ImageRepository.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.woowacourse.staccato.domain.repository - -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.data.dto.image.ImageResponse -import okhttp3.MultipartBody - -interface ImageRepository { - suspend fun convertImageFileToUrl(imageFile: MultipartBody.Part): ResponseResult -} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/repository/TimelineRepository.kt b/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/repository/TimelineRepository.kt deleted file mode 100644 index 1bc034052..000000000 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/domain/repository/TimelineRepository.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.woowacourse.staccato.domain.repository - -import com.woowacourse.staccato.data.ResponseResult -import com.woowacourse.staccato.domain.model.Timeline - -interface TimelineRepository { - suspend fun getTimeline(): ResponseResult -} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/AttachedPhotoHandler.kt b/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/AttachedPhotoHandler.kt deleted file mode 100644 index b32db1bfe..000000000 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/common/AttachedPhotoHandler.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.woowacourse.staccato.presentation.common - -import com.woowacourse.staccato.presentation.momentcreation.model.AttachedPhotoUiModel - -interface AttachedPhotoHandler { - fun onDeleteClicked(deletedPhoto: AttachedPhotoUiModel) - - fun onAddClicked() -} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/main/MainHandler.kt b/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/main/MainHandler.kt deleted file mode 100644 index 182a64015..000000000 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/main/MainHandler.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.woowacourse.staccato.presentation.main - -interface MainHandler { - fun onCreationClicked() -} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/mapper/VisitUiModelMapper.kt b/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/mapper/VisitUiModelMapper.kt deleted file mode 100644 index dff1ecd68..000000000 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/mapper/VisitUiModelMapper.kt +++ /dev/null @@ -1,52 +0,0 @@ -package com.woowacourse.staccato.presentation.mapper - -import com.woowacourse.staccato.R -import com.woowacourse.staccato.domain.model.Comment -import com.woowacourse.staccato.domain.model.Feeling -import com.woowacourse.staccato.domain.model.Moment -import com.woowacourse.staccato.presentation.moment.comments.CommentUiModel -import com.woowacourse.staccato.presentation.moment.detail.MomentDetailUiModel -import com.woowacourse.staccato.presentation.moment.feeling.FeelingUiModel -import com.woowacourse.staccato.presentation.visitupdate.model.VisitUpdateDefaultUiModel - -fun Moment.toMomentDetailUiModel(): MomentDetailUiModel { - return MomentDetailUiModel( - id = momentId, - memoryId = memoryId, - memoryTitle = memoryTitle, - placeName = placeName, - momentImageUrls = momentImageUrls, - address = address, - visitedAt = visitedAt, - ) -} - -fun Moment.toVisitUpdateDefaultUiModel(): VisitUpdateDefaultUiModel { - return VisitUpdateDefaultUiModel( - id = momentId, - address = address, - visitedAt = visitedAt, - ) -} - -fun Comment.toCommentUiModel() = - CommentUiModel( - id = commentId, - memberId = memberId, - nickname = nickname, - memberImageUrl = memberImageUrl, - content = content, - ) - -fun Feeling.toFeelingUiModel(selectedFeeling: String = Feeling.NOTHING.value): FeelingUiModel { - val src = - when (this) { - Feeling.HAPPY -> R.drawable.feeling_happy - Feeling.ANGRY -> R.drawable.feeling_angry - Feeling.SAD -> R.drawable.feeling_sad - Feeling.SCARED -> R.drawable.feeling_scared - Feeling.EXCITED -> R.drawable.feeling_excited - Feeling.NOTHING -> null - } - return FeelingUiModel(value, src, selectedFeeling == this.value) -} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/KeyboardActionHandler.kt b/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/KeyboardActionHandler.kt deleted file mode 100644 index f9cfee9f3..000000000 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/comments/KeyboardActionHandler.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.woowacourse.staccato.presentation.moment.comments - -interface KeyboardActionHandler { - fun onScreenTouchEvent() -} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/feeling/FeelingUiModel.kt b/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/feeling/FeelingUiModel.kt deleted file mode 100644 index 9d08f3f44..000000000 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/moment/feeling/FeelingUiModel.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.woowacourse.staccato.presentation.moment.feeling - -data class FeelingUiModel( - val feeling: String, - val src: Int?, - val isSelected: Boolean = false, -) diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/dialog/MemorySelectionHandler.kt b/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/dialog/MemorySelectionHandler.kt deleted file mode 100644 index 01ce9f5f2..000000000 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/momentcreation/dialog/MemorySelectionHandler.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.woowacourse.staccato.presentation.momentcreation.dialog - -import com.woowacourse.staccato.domain.model.MemoryCandidate - -fun interface MemorySelectionHandler { - fun onConfirmClicked(memoryUiModel: MemoryCandidate) -} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/adapter/FirstTimelineViewHolder.kt b/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/adapter/FirstTimelineViewHolder.kt deleted file mode 100644 index 792cfceb3..000000000 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/adapter/FirstTimelineViewHolder.kt +++ /dev/null @@ -1,23 +0,0 @@ -package com.woowacourse.staccato.presentation.timeline.adapter - -import android.view.View -import com.woowacourse.staccato.databinding.ItemTimelineFirstBinding -import com.woowacourse.staccato.presentation.timeline.TimelineHandler -import com.woowacourse.staccato.presentation.timeline.model.TimelineUiModel - -class FirstTimelineViewHolder( - private val binding: ItemTimelineFirstBinding, - private val eventHandler: TimelineHandler, - private val isOnlyOne: Boolean, -) : TimelineViewHolder(binding, eventHandler) { - override fun bind(item: TimelineUiModel) { - binding.memory = item - binding.eventHandler = eventHandler - binding.viewTimeline.visibility = - if (isOnlyOne) { - View.INVISIBLE - } else { - View.VISIBLE - } - } -} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/adapter/LastTimelineViewHolder.kt b/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/adapter/LastTimelineViewHolder.kt deleted file mode 100644 index 6bdff2507..000000000 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/adapter/LastTimelineViewHolder.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.woowacourse.staccato.presentation.timeline.adapter - -import com.woowacourse.staccato.databinding.ItemTimelineLastBinding -import com.woowacourse.staccato.presentation.timeline.TimelineHandler -import com.woowacourse.staccato.presentation.timeline.model.TimelineUiModel - -class LastTimelineViewHolder( - private val binding: ItemTimelineLastBinding, - private val eventHandler: TimelineHandler, -) : TimelineViewHolder(binding, eventHandler) { - override fun bind(item: TimelineUiModel) { - binding.memory = item - binding.eventHandler = eventHandler - } -} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/adapter/MiddleTimelineViewHolder.kt b/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/adapter/MiddleTimelineViewHolder.kt deleted file mode 100644 index 330c364f9..000000000 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/adapter/MiddleTimelineViewHolder.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.woowacourse.staccato.presentation.timeline.adapter - -import com.woowacourse.staccato.databinding.ItemTimelineMiddleBinding -import com.woowacourse.staccato.presentation.timeline.TimelineHandler -import com.woowacourse.staccato.presentation.timeline.model.TimelineUiModel - -class MiddleTimelineViewHolder( - private val binding: ItemTimelineMiddleBinding, - private val eventHandler: TimelineHandler, -) : TimelineViewHolder(binding, eventHandler) { - override fun bind(item: TimelineUiModel) { - binding.memory = item - binding.eventHandler = eventHandler - } -} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/adapter/TimelineAdapter.kt b/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/adapter/TimelineAdapter.kt deleted file mode 100644 index d8bd5c568..000000000 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/adapter/TimelineAdapter.kt +++ /dev/null @@ -1,83 +0,0 @@ -package com.woowacourse.staccato.presentation.timeline.adapter - -import android.view.LayoutInflater -import android.view.ViewGroup -import androidx.recyclerview.widget.DiffUtil -import androidx.recyclerview.widget.ListAdapter -import com.woowacourse.staccato.databinding.ItemTimelineFirstBinding -import com.woowacourse.staccato.databinding.ItemTimelineLastBinding -import com.woowacourse.staccato.databinding.ItemTimelineMiddleBinding -import com.woowacourse.staccato.presentation.timeline.TimelineHandler -import com.woowacourse.staccato.presentation.timeline.model.TimelineUiModel - -class TimelineAdapter(private val eventHandler: TimelineHandler) : - ListAdapter(diffUtil) { - override fun getItemViewType(position: Int): Int { - return TimelineViewType.fromPosition(position, itemCount).viewType - } - - override fun onCreateViewHolder( - parent: ViewGroup, - viewType: Int, - ): TimelineViewHolder { - return when (TimelineViewType.byViewType(viewType)) { - TimelineViewType.FIRST_ITEM -> { - val binding = - ItemTimelineFirstBinding.inflate( - LayoutInflater.from(parent.context), - parent, - false, - ) - FirstTimelineViewHolder(binding, eventHandler, currentList.size == LIST_SIZE_ONE) - } - - TimelineViewType.MIDDLE_ITEM -> { - val binding = - ItemTimelineMiddleBinding.inflate( - LayoutInflater.from(parent.context), - parent, - false, - ) - MiddleTimelineViewHolder(binding, eventHandler) - } - - TimelineViewType.LAST_ITEM -> { - val binding = - ItemTimelineLastBinding.inflate( - LayoutInflater.from(parent.context), - parent, - false, - ) - LastTimelineViewHolder(binding, eventHandler) - } - } - } - - override fun onBindViewHolder( - holder: TimelineViewHolder, - position: Int, - ) { - holder.bind(currentList[position]) - } - - fun updateTimeline(newTimeline: List) { - submitList(newTimeline) - } - - companion object { - private const val LIST_SIZE_ONE = 1 - - val diffUtil = - object : DiffUtil.ItemCallback() { - override fun areContentsTheSame( - oldItem: TimelineUiModel, - newItem: TimelineUiModel, - ): Boolean = oldItem == newItem - - override fun areItemsTheSame( - oldItem: TimelineUiModel, - newItem: TimelineUiModel, - ): Boolean = oldItem.memoryId == newItem.memoryId - } - } -} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/adapter/TimelineViewHolder.kt b/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/adapter/TimelineViewHolder.kt deleted file mode 100644 index 32879f797..000000000 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/adapter/TimelineViewHolder.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.woowacourse.staccato.presentation.timeline.adapter - -import androidx.databinding.ViewDataBinding -import androidx.recyclerview.widget.RecyclerView -import com.woowacourse.staccato.presentation.timeline.TimelineHandler -import com.woowacourse.staccato.presentation.timeline.model.TimelineUiModel - -sealed class TimelineViewHolder( - binding: ViewDataBinding, - private val eventHandler: TimelineHandler, -) : - RecyclerView.ViewHolder(binding.root) { - abstract fun bind(item: TimelineUiModel) -} diff --git a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/adapter/TimelineViewType.kt b/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/adapter/TimelineViewType.kt deleted file mode 100644 index faf5ec78f..000000000 --- a/android/Staccato_AN/app/src/main/java/com/woowacourse/staccato/presentation/timeline/adapter/TimelineViewType.kt +++ /dev/null @@ -1,29 +0,0 @@ -package com.woowacourse.staccato.presentation.timeline.adapter - -enum class TimelineViewType(val viewType: Int) { - FIRST_ITEM(0), - MIDDLE_ITEM(1), - LAST_ITEM(2), ; - - companion object { - private const val FIRST_INDEX = 0 - private const val LAST_INDEX_ADJUSTMENT = 1 - - fun fromPosition( - position: Int, - totalSize: Int, - ): TimelineViewType { - return if (position == FIRST_INDEX) { - FIRST_ITEM - } else if (position < totalSize - LAST_INDEX_ADJUSTMENT) { - MIDDLE_ITEM - } else { - LAST_ITEM - } - } - - fun byViewType(viewType: Int): TimelineViewType { - return entries.first { it.viewType == viewType } - } - } -} diff --git a/android/Staccato_AN/app/src/main/res/drawable/calendar_today.xml b/android/Staccato_AN/app/src/main/res/drawable/calendar_today.xml new file mode 100644 index 000000000..ef8489782 --- /dev/null +++ b/android/Staccato_AN/app/src/main/res/drawable/calendar_today.xml @@ -0,0 +1,12 @@ + + + + + + diff --git a/android/Staccato_AN/app/src/main/res/drawable/feeling_angry.png b/android/Staccato_AN/app/src/main/res/drawable/feeling_angry.png index 01c2359ad..2d172f978 100644 Binary files a/android/Staccato_AN/app/src/main/res/drawable/feeling_angry.png and b/android/Staccato_AN/app/src/main/res/drawable/feeling_angry.png differ diff --git a/android/Staccato_AN/app/src/main/res/drawable/feeling_angry_gray.png b/android/Staccato_AN/app/src/main/res/drawable/feeling_angry_gray.png new file mode 100644 index 000000000..dff182de3 Binary files /dev/null and b/android/Staccato_AN/app/src/main/res/drawable/feeling_angry_gray.png differ diff --git a/android/Staccato_AN/app/src/main/res/drawable/feeling_excited.png b/android/Staccato_AN/app/src/main/res/drawable/feeling_excited.png index 8d905a54b..b98acd036 100644 Binary files a/android/Staccato_AN/app/src/main/res/drawable/feeling_excited.png and b/android/Staccato_AN/app/src/main/res/drawable/feeling_excited.png differ diff --git a/android/Staccato_AN/app/src/main/res/drawable/feeling_excited_gray.png b/android/Staccato_AN/app/src/main/res/drawable/feeling_excited_gray.png new file mode 100644 index 000000000..f1e200a33 Binary files /dev/null and b/android/Staccato_AN/app/src/main/res/drawable/feeling_excited_gray.png differ diff --git a/android/Staccato_AN/app/src/main/res/drawable/feeling_happy.png b/android/Staccato_AN/app/src/main/res/drawable/feeling_happy.png index 82e2003a5..ca148676d 100644 Binary files a/android/Staccato_AN/app/src/main/res/drawable/feeling_happy.png and b/android/Staccato_AN/app/src/main/res/drawable/feeling_happy.png differ diff --git a/android/Staccato_AN/app/src/main/res/drawable/feeling_happy_gray.png b/android/Staccato_AN/app/src/main/res/drawable/feeling_happy_gray.png new file mode 100644 index 000000000..dd6f78258 Binary files /dev/null and b/android/Staccato_AN/app/src/main/res/drawable/feeling_happy_gray.png differ diff --git a/android/Staccato_AN/app/src/main/res/drawable/feeling_sad.png b/android/Staccato_AN/app/src/main/res/drawable/feeling_sad.png index 986ce4393..cb198eff2 100644 Binary files a/android/Staccato_AN/app/src/main/res/drawable/feeling_sad.png and b/android/Staccato_AN/app/src/main/res/drawable/feeling_sad.png differ diff --git a/android/Staccato_AN/app/src/main/res/drawable/feeling_sad_gray.png b/android/Staccato_AN/app/src/main/res/drawable/feeling_sad_gray.png new file mode 100644 index 000000000..7ef6ef8e4 Binary files /dev/null and b/android/Staccato_AN/app/src/main/res/drawable/feeling_sad_gray.png differ diff --git a/android/Staccato_AN/app/src/main/res/drawable/feeling_scared.png b/android/Staccato_AN/app/src/main/res/drawable/feeling_scared.png index 02760580f..8782de35b 100644 Binary files a/android/Staccato_AN/app/src/main/res/drawable/feeling_scared.png and b/android/Staccato_AN/app/src/main/res/drawable/feeling_scared.png differ diff --git a/android/Staccato_AN/app/src/main/res/drawable/feeling_scared_gray.png b/android/Staccato_AN/app/src/main/res/drawable/feeling_scared_gray.png new file mode 100644 index 000000000..f1f9ae81c Binary files /dev/null and b/android/Staccato_AN/app/src/main/res/drawable/feeling_scared_gray.png differ diff --git a/android/Staccato_AN/app/src/main/res/drawable/icon_arrow_left.xml b/android/Staccato_AN/app/src/main/res/drawable/icon_arrow_left.xml index 1d9fa0cdb..4e8a10ba5 100644 --- a/android/Staccato_AN/app/src/main/res/drawable/icon_arrow_left.xml +++ b/android/Staccato_AN/app/src/main/res/drawable/icon_arrow_left.xml @@ -4,7 +4,7 @@ android:viewportWidth="36" android:viewportHeight="36"> diff --git a/android/Staccato_AN/app/src/main/res/drawable/icon_edit.xml b/android/Staccato_AN/app/src/main/res/drawable/icon_edit.xml new file mode 100644 index 000000000..b7bbdc751 --- /dev/null +++ b/android/Staccato_AN/app/src/main/res/drawable/icon_edit.xml @@ -0,0 +1,14 @@ + + + + + + diff --git a/android/Staccato_AN/app/src/main/res/drawable/icon_filter.xml b/android/Staccato_AN/app/src/main/res/drawable/icon_filter.xml index f4786c974..9b81a4977 100644 --- a/android/Staccato_AN/app/src/main/res/drawable/icon_filter.xml +++ b/android/Staccato_AN/app/src/main/res/drawable/icon_filter.xml @@ -1,13 +1,12 @@ + android:width="14dp" + android:height="14dp" + android:viewportWidth="14" + android:viewportHeight="14"> - + + android:fillColor="#949494" + android:pathData="M8.779,11C8.998,11 9.197,10.949 9.377,10.847C9.557,10.745 9.701,10.609 9.809,10.439C9.916,10.268 9.97,10.079 9.97,9.873C9.97,9.666 9.916,9.477 9.809,9.307C9.701,9.136 9.557,9 9.377,8.898C9.197,8.796 8.998,8.745 8.779,8.745C8.561,8.745 8.361,8.796 8.181,8.898C8.001,9 7.856,9.136 7.747,9.307C7.638,9.477 7.583,9.666 7.583,9.873C7.583,10.079 7.638,10.268 7.747,10.439C7.856,10.609 8.001,10.745 8.181,10.847C8.361,10.949 8.561,11 8.779,11ZM8.779,10.422C8.617,10.422 8.48,10.369 8.367,10.262C8.255,10.156 8.199,10.026 8.199,9.873C8.199,9.716 8.255,9.585 8.367,9.48C8.48,9.375 8.617,9.323 8.779,9.323C8.941,9.323 9.079,9.375 9.191,9.48C9.304,9.585 9.36,9.716 9.36,9.873C9.36,10.026 9.304,10.156 9.191,10.262C9.079,10.369 8.941,10.422 8.779,10.422ZM7.99,9.492H2.397C2.288,9.492 2.194,9.529 2.117,9.602C2.039,9.676 2,9.766 2,9.873C2,9.976 2.039,10.064 2.117,10.138C2.194,10.212 2.288,10.248 2.397,10.248H7.99V9.492ZM11.618,9.492H9.643V10.248H11.618C11.72,10.248 11.81,10.212 11.886,10.138C11.962,10.064 12,9.976 12,9.873C12,9.766 11.962,9.676 11.886,9.602C11.81,9.529 11.72,9.492 11.618,9.492ZM5.275,8.134C5.494,8.134 5.693,8.083 5.873,7.979C6.054,7.876 6.198,7.739 6.305,7.568C6.413,7.398 6.467,7.209 6.467,7.002C6.467,6.796 6.413,6.607 6.305,6.436C6.198,6.266 6.054,6.129 5.873,6.028C5.693,5.926 5.494,5.875 5.275,5.875C5.057,5.875 4.858,5.926 4.677,6.028C4.497,6.129 4.353,6.266 4.246,6.436C4.138,6.607 4.084,6.796 4.084,7.002C4.084,7.209 4.138,7.398 4.246,7.568C4.353,7.739 4.497,7.876 4.677,7.979C4.858,8.083 5.057,8.134 5.275,8.134ZM5.275,7.552C5.113,7.552 4.976,7.499 4.864,7.392C4.751,7.286 4.695,7.156 4.695,7.002C4.695,6.846 4.751,6.715 4.864,6.61C4.976,6.505 5.113,6.453 5.275,6.453C5.441,6.453 5.579,6.505 5.69,6.61C5.801,6.715 5.856,6.846 5.856,7.002C5.856,7.156 5.801,7.286 5.69,7.392C5.579,7.499 5.441,7.552 5.275,7.552ZM2.377,6.622C2.278,6.622 2.19,6.659 2.114,6.732C2.038,6.806 2,6.896 2,7.002C2,7.109 2.038,7.198 2.114,7.27C2.19,7.342 2.278,7.378 2.377,7.378H4.422V6.622H2.377ZM11.598,6.622H6.065V7.378H11.598C11.71,7.378 11.806,7.342 11.883,7.27C11.961,7.198 12,7.109 12,7.002C12,6.896 11.961,6.806 11.883,6.732C11.806,6.659 11.71,6.622 11.598,6.622ZM8.779,5.26C8.998,5.26 9.197,5.209 9.377,5.107C9.557,5.005 9.701,4.869 9.809,4.698C9.916,4.528 9.97,4.339 9.97,4.132C9.97,3.925 9.916,3.737 9.809,3.566C9.701,3.395 9.557,3.258 9.377,3.155C9.197,3.052 8.998,3 8.779,3C8.561,3 8.361,3.052 8.181,3.155C8.001,3.258 7.856,3.395 7.747,3.566C7.638,3.737 7.583,3.925 7.583,4.132C7.583,4.339 7.638,4.528 7.747,4.698C7.856,4.869 8.001,5.005 8.181,5.107C8.361,5.209 8.561,5.26 8.779,5.26ZM8.779,4.682C8.617,4.682 8.48,4.628 8.367,4.52C8.255,4.412 8.199,4.281 8.199,4.127C8.199,3.974 8.255,3.844 8.367,3.738C8.48,3.631 8.617,3.578 8.779,3.578C8.941,3.578 9.079,3.631 9.191,3.738C9.304,3.844 9.36,3.974 9.36,4.127C9.36,4.281 9.304,4.412 9.191,4.52C9.079,4.628 8.941,4.682 8.779,4.682ZM8.015,3.756H2.397C2.288,3.756 2.194,3.793 2.117,3.867C2.039,3.94 2,4.029 2,4.132C2,4.239 2.039,4.329 2.117,4.402C2.194,4.476 2.288,4.513 2.397,4.513H8.015V3.756ZM11.618,3.756H9.573V4.513H11.618C11.72,4.513 11.81,4.476 11.886,4.402C11.962,4.329 12,4.239 12,4.132C12,4.029 11.962,3.94 11.886,3.867C11.81,3.793 11.72,3.756 11.618,3.756Z" /> diff --git a/android/Staccato_AN/app/src/main/res/drawable/icon_folder.xml b/android/Staccato_AN/app/src/main/res/drawable/icon_folder.xml new file mode 100644 index 000000000..58918f1fb --- /dev/null +++ b/android/Staccato_AN/app/src/main/res/drawable/icon_folder.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/android/Staccato_AN/app/src/main/res/drawable/memory_gradient.xml b/android/Staccato_AN/app/src/main/res/drawable/memory_gradient.xml new file mode 100644 index 000000000..dc64ff730 --- /dev/null +++ b/android/Staccato_AN/app/src/main/res/drawable/memory_gradient.xml @@ -0,0 +1,14 @@ + + + + + + + diff --git a/android/Staccato_AN/app/src/main/res/drawable/shape_all_gray1_4dp.xml b/android/Staccato_AN/app/src/main/res/drawable/shape_all_gray1_4dp.xml index 723664d03..5e03848ef 100644 --- a/android/Staccato_AN/app/src/main/res/drawable/shape_all_gray1_4dp.xml +++ b/android/Staccato_AN/app/src/main/res/drawable/shape_all_gray1_4dp.xml @@ -1,5 +1,7 @@ - + diff --git a/android/Staccato_AN/app/src/main/res/drawable/shape_bottom_sheet_square.xml b/android/Staccato_AN/app/src/main/res/drawable/shape_bottom_sheet_square.xml new file mode 100644 index 000000000..87cbb093f --- /dev/null +++ b/android/Staccato_AN/app/src/main/res/drawable/shape_bottom_sheet_square.xml @@ -0,0 +1,4 @@ + + + + diff --git a/android/Staccato_AN/app/src/main/res/drawable/staccato_gradient.xml b/android/Staccato_AN/app/src/main/res/drawable/staccato_gradient.xml new file mode 100644 index 000000000..10e7d69db --- /dev/null +++ b/android/Staccato_AN/app/src/main/res/drawable/staccato_gradient.xml @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/android/Staccato_AN/app/src/main/res/layout/activity_login.xml b/android/Staccato_AN/app/src/main/res/layout/activity_login.xml index 0a9fa49de..6e4473be1 100644 --- a/android/Staccato_AN/app/src/main/res/layout/activity_login.xml +++ b/android/Staccato_AN/app/src/main/res/layout/activity_login.xml @@ -7,11 +7,11 @@ + type="com.on.staccato.presentation.login.viewmodel.LoginViewModel" /> + type="com.on.staccato.presentation.login.LoginHandler" /> + type="com.on.staccato.presentation.main.MainHandler" /> - - - - diff --git a/android/Staccato_AN/app/src/main/res/layout/activity_memory_creation.xml b/android/Staccato_AN/app/src/main/res/layout/activity_memory_creation.xml index 9ed383770..dc24a7ece 100644 --- a/android/Staccato_AN/app/src/main/res/layout/activity_memory_creation.xml +++ b/android/Staccato_AN/app/src/main/res/layout/activity_memory_creation.xml @@ -10,11 +10,11 @@ + type="com.on.staccato.presentation.memorycreation.viewmodel.MemoryCreationViewModel" /> + type="com.on.staccato.presentation.memorycreation.MemoryCreationHandler" /> + app:layout_constraintTop_toTopOf="parent" + app:subtitle="@string/memory_creation_toolbar_subtitle" + app:title="@string/memory_creation_toolbar_title" /> + app:layout_constraintTop_toTopOf="@id/iv_memory_creation_photo_attach" + bind:thumbnailUri="@{viewModel.thumbnailUri}" + bind:thumbnailUrl="@{viewModel.thumbnailUrl}" /> + bind:startDate="@{viewModel.startDate}" /> diff --git a/android/Staccato_AN/app/src/main/res/layout/activity_memory_update.xml b/android/Staccato_AN/app/src/main/res/layout/activity_memory_update.xml index 0d578f9d5..3cd9de737 100644 --- a/android/Staccato_AN/app/src/main/res/layout/activity_memory_update.xml +++ b/android/Staccato_AN/app/src/main/res/layout/activity_memory_update.xml @@ -10,11 +10,11 @@ + type="com.on.staccato.presentation.memoryupdate.viewmodel.MemoryUpdateViewModel" /> + type="com.on.staccato.presentation.memoryupdate.MemoryUpdateHandler" /> + app:layout_constraintTop_toTopOf="parent" + app:subtitle="@string/memory_update_toolbar_subtitle" + app:title="@string/memory_update_toolbar_title" /> + bind:photoUrl="@{viewModel.thumbnailUrl}" + bind:startDate="@{viewModel.startDate}" /> diff --git a/android/Staccato_AN/app/src/main/res/layout/activity_visit_creation.xml b/android/Staccato_AN/app/src/main/res/layout/activity_visit_creation.xml index 9c569a2d1..81d271e06 100644 --- a/android/Staccato_AN/app/src/main/res/layout/activity_visit_creation.xml +++ b/android/Staccato_AN/app/src/main/res/layout/activity_visit_creation.xml @@ -10,11 +10,11 @@ + type="com.on.staccato.presentation.momentcreation.viewmodel.MomentCreationViewModel" /> + type="com.on.staccato.presentation.momentcreation.MomentCreationHandler" /> + app:layout_constraintTop_toTopOf="parent" + app:subtitle="@string/visit_creation_toolbar_subtitle" + app:title="@string/visit_creation_toolbar_title" /> + type="com.on.staccato.presentation.visitupdate.viewmodel.VisitUpdateViewModel" /> + type="com.on.staccato.presentation.visitupdate.VisitUpdateHandler" /> + app:layout_constraintTop_toTopOf="parent" + app:subtitle="@string/visit_creation_toolbar_subtitle" + app:title="@string/visit_creation_toolbar_title" /> + type="com.on.staccato.presentation.memory.viewmodel.MemoryViewModel" /> + type="com.on.staccato.presentation.memory.MemoryHandler" /> + type="com.on.staccato.presentation.common.ToolbarHandler" /> @@ -58,48 +58,51 @@ android:layout_height="0dp" android:contentDescription="@string/all_image_content_description" android:scaleType="centerCrop" - android:visibility="@{viewModel.memory.memoryThumbnailUrl == null ? View.GONE : View.VISIBLE}" - app:layout_constraintDimensionRatio="1:1" + app:layout_constraintDimensionRatio="3:2" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" bind:coilImageUrl="@{viewModel.memory.memoryThumbnailUrl}" - bind:coilPlaceHolder="@{@drawable/shape_place_holder_rectangle}" + bind:coilPlaceHolder="@{@drawable/memory_gradient}" tools:src="@drawable/shape_place_holder_rectangle" /> + + + tools:text="아주 아주 아주 아주 아주 아주 아주 아주 아주 아주 아주 아주 긴 추억 제목" /> - - + app:layout_constraintTop_toBottomOf="@id/iv_memory_thumbnail" + tools:text="(추억 소개) Lorem Ipsum is simply dummy text of the printing and typesetting industry. " /> - + app:layout_constraintTop_toTopOf="@id/tv_memory_visits"> + +