Skip to content

Commit 63bd9e3

Browse files
authored
Merge pull request #570 from DKU-Dgaja/an-refactor(#554)-전체-ui-수정
[AN] refactor(#554): 전체 UI 수정
2 parents 492783d + 4fd0102 commit 63bd9e3

File tree

137 files changed

+1552
-1072
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+1552
-1072
lines changed

android/gitudy/data/src/main/java/com/takseha/data/api/gitudy/GitudyAuthService.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ interface GitudyAuthService {
6363
suspend fun getUserInfoUpdatePage(
6464
): Response<UserInfoUpdatePageResponse>
6565

66+
@GET("/auth/update/pushAlarmYn/{pushAlarmEnable}")
67+
suspend fun updatePushAlarmYn(
68+
@Path("pushAlarmEnable") pushAlarmEnable: Boolean
69+
): Response<Void>
70+
6671
@POST("/auth/update")
6772
suspend fun updateUserInfo(
6873
@Body request: UserInfoUpdateRequest

android/gitudy/data/src/main/java/com/takseha/data/dto/mystudy/Commit.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,21 @@ data class Commit(
1414
@SerializedName("like_count")
1515
val likeCount: LikeCount,
1616
@SerializedName("message")
17-
val message: String,
17+
val message: String?,
1818
@SerializedName("rejection-reason")
19-
val rejectionReason: String,
19+
val rejectionReason: String?,
2020
@SerializedName("status")
2121
val status: CommitStatus,
2222
@SerializedName("study_info_id")
2323
val studyInfoId: Int,
2424
@SerializedName("study_todo_id")
2525
val studyTodoId: Int,
2626
@SerializedName("user_id")
27-
val userId: Int
27+
val userId: Int,
28+
@SerializedName("name")
29+
val name: String,
30+
@SerializedName("profile_image_url")
31+
val profileImageUrl: String?
2832
): Serializable
2933

3034
data class LikeCount(

android/gitudy/data/src/main/java/com/takseha/data/dto/mystudy/StudyInfoResponse.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ data class StudyInfoResponse(
2424
@SerializedName("period_type")
2525
val periodType: StudyPeriodStatus = StudyPeriodStatus.STUDY_PERIOD_WEEK,
2626
@SerializedName("profile_image_url")
27-
val profileImageUrl: String = "#ffffff",
27+
val profileImageUrl: String = "-1",
2828
@SerializedName("score")
2929
val score: Int = 0,
3030
@SerializedName("status")

android/gitudy/data/src/main/java/com/takseha/data/repository/gitudy/GitudyAuthRepository.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,8 @@ class GitudyAuthRepository {
2121
suspend fun updateUserInfo(
2222
request: UserInfoUpdateRequest
2323
) = client.updateUserInfo(request)
24+
25+
suspend fun updatePushAlarmYn(
26+
pushAlarmEnable: Boolean
27+
) = client.updatePushAlarmYn(pushAlarmEnable)
2428
}

android/gitudy/data/src/main/java/com/takseha/data/token/TokenManager.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ class TokenManager(context: Context) {
2525

2626

2727
var accessToken: String?
28-
get() = prefs.loadPref(SPKey.ACCESS_TOKEN, "0")
28+
get() = prefs.loadPref(SPKey.ACCESS_TOKEN, "")
2929
set(value) {
3030
prefs.savePref(SPKey.ACCESS_TOKEN, value!!)
3131
}
3232

3333
var refreshToken: String?
34-
get() = prefs.loadPref(SPKey.REFRESH_TOKEN, "0")
34+
get() = prefs.loadPref(SPKey.REFRESH_TOKEN, "")
3535
set(value) {
3636
prefs.savePref(SPKey.REFRESH_TOKEN, value!!)
3737
}

android/gitudy/presentation/src/main/AndroidManifest.xml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
<activity
1515
android:name=".ui.home.MainHomeAlertActivity"
1616
android:exported="false" />
17-
<activity
18-
android:name=".ui.mystudy.StudyCommentBoardActivity"
19-
android:exported="false"
20-
android:windowSoftInputMode="adjustResize" />
2117
<activity
2218
android:name=".ui.mystudy.CommitConventionActivity"
2319
android:exported="false"
@@ -36,20 +32,9 @@
3632
android:name=".ui.feed.StudyApplyActivity"
3733
android:exported="false"
3834
android:windowSoftInputMode="adjustPan" />
39-
<activity
40-
android:name=".ui.mystudy.AddTodoActivity"
41-
android:exported="false"
42-
android:windowSoftInputMode="adjustResize" />
4335
<activity
4436
android:name=".ui.mystudy.MemberStudySettingActivity"
4537
android:exported="false" />
46-
<activity
47-
android:name=".ui.mystudy.CaptainStudySettingActivity"
48-
android:exported="false" />
49-
<activity
50-
android:name=".ui.mystudy.ToDoActivity"
51-
android:exported="false"
52-
android:windowSoftInputMode="adjustResize" />
5338
<activity
5439
android:name=".ui.mystudy.MyStudyMainActivity"
5540
android:exported="false"
@@ -66,7 +51,7 @@
6651
<activity
6752
android:name=".ui.profile.ProfileEditActivity"
6853
android:exported="false"
69-
android:windowSoftInputMode="adjustResize" />
54+
android:windowSoftInputMode="adjustPan" />
7055
<activity
7156
android:name=".ui.auth.PopupAgreementActivity"
7257
android:exported="false"

android/gitudy/presentation/src/main/java/com/takseha/presentation/adapter/AllCategoryRVAdapter.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import androidx.recyclerview.widget.RecyclerView
1313
import com.takseha.data.dto.feed.Category
1414
import com.takseha.presentation.R
1515
import com.takseha.presentation.databinding.ItemCategoryAllBinding
16-
import com.takseha.presentation.databinding.ItemCategoryBinding
1716

1817
class AllCategoryRVAdapter(
1918
private val context: Context,

android/gitudy/presentation/src/main/java/com/takseha/presentation/adapter/CategoryInStudyRVAdapter.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ package com.takseha.presentation.adapter
33
import android.content.Context
44
import android.os.Build
55
import android.view.LayoutInflater
6-
import android.view.View
76
import android.view.ViewGroup
87
import androidx.annotation.RequiresApi
98
import androidx.recyclerview.widget.RecyclerView
10-
import com.takseha.presentation.databinding.ItemCategoryBinding
119
import com.takseha.presentation.databinding.ItemCategoryInStudyBinding
1210

1311
class CategoryInStudyRVAdapter(val context : Context, val categoryList: List<String>) : RecyclerView.Adapter<CategoryInStudyRVAdapter.ViewHolder>() {

android/gitudy/presentation/src/main/java/com/takseha/presentation/adapter/CommentListRVAdapter.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import com.bumptech.glide.Glide
1010
import com.takseha.data.dto.mystudy.StudyComment
1111
import com.takseha.presentation.R
1212
import com.takseha.presentation.databinding.ItemCommentBinding
13+
import com.takseha.presentation.ui.common.UTCToKoreanTimeConverter
1314
import java.time.LocalDateTime
1415

1516
class CommentListRVAdapter(val context: Context, val commentList: List<StudyComment>) :
@@ -35,8 +36,8 @@ class CommentListRVAdapter(val context: Context, val commentList: List<StudyComm
3536
.into(holder.profileImg)
3637

3738
holder.content.text = commentList[position].content
38-
holder.date.text =
39-
LocalDateTime.parse(commentList[position].commentSetDate).toLocalDate().toString()
39+
val localDateTime = LocalDateTime.parse(commentList[position].commentSetDate)
40+
holder.date.text = UTCToKoreanTimeConverter().convertToKoreaDate(localDateTime)
4041
}
4142

4243
override fun getItemCount(): Int {

android/gitudy/presentation/src/main/java/com/takseha/presentation/adapter/CommitListRVAdapter.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ import androidx.core.content.ContextCompat
99
import androidx.recyclerview.widget.RecyclerView
1010
import com.takseha.data.dto.mystudy.Commit
1111
import com.takseha.data.dto.mystudy.CommitStatus
12-
import com.takseha.data.dto.mystudy.LikeCount
1312
import com.takseha.presentation.R
1413
import com.takseha.presentation.databinding.ItemCommitBinding
14+
import com.takseha.presentation.ui.common.UTCToKoreanTimeConverter
15+
import java.time.LocalDateTime
1516

1617
class CommitListRVAdapter(val context : Context, val commitList : List<Commit>, val onClickListener: ToDoListRVAdapter.OnClickListener) : RecyclerView.Adapter<CommitListRVAdapter.ViewHolder>() {
1718

@@ -40,7 +41,8 @@ class CommitListRVAdapter(val context : Context, val commitList : List<Commit>,
4041
@RequiresApi(Build.VERSION_CODES.O)
4142
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
4243
holder.commitTitle.text = commitList[position].message
43-
holder.commitInfo.text = context.getString(R.string.study_to_do_commit_info, commitList[position].rejectionReason, commitList[position].commitDate)
44+
val localDateTime = LocalDateTime.parse(commitList[position].commitDate)
45+
holder.commitInfo.text = context.getString(R.string.study_to_do_commit_info, commitList[position].name, UTCToKoreanTimeConverter().convertToKoreaDate(localDateTime))
4446
when (commitList[position].status) {
4547
CommitStatus.COMMIT_APPROVAL -> holder.commitStatus.text = "승인완료"
4648
CommitStatus.COMMIT_DELETE -> {

0 commit comments

Comments
 (0)