Skip to content

Commit

Permalink
[CHORE/#227] custom Snackbar 일부 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
chattymin committed Mar 8, 2024
1 parent 584ed41 commit 75ff1bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import androidx.lifecycle.flowWithLifecycle
import androidx.lifecycle.lifecycleScope
import com.going.presentation.R
import com.going.presentation.databinding.ActivityProfileEditBinding
import com.going.presentation.designsystem.snackbar.customSnackBar
import com.going.ui.base.BaseActivity
import com.going.ui.extension.setOnSingleClickListener
import com.going.ui.extension.toast
Expand Down Expand Up @@ -96,7 +97,7 @@ class ProfileEditActivity :
if (it) {
toast(getString(R.string.edit_profile_finish))
finish()
} else toast(getString(R.string.server_error))
} else customSnackBar(binding.root, getString(R.string.server_error))
}.launchIn(lifecycleScope)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.going.presentation.profile.participant
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.util.Log
import androidx.activity.viewModels
import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.view.isVisible
Expand All @@ -14,6 +13,7 @@ import coil.transform.CircleCropTransformation
import com.going.domain.entity.response.ParticipantProfileResponseModel
import com.going.presentation.R
import com.going.presentation.databinding.ActivityParticipantProfileBinding
import com.going.presentation.designsystem.snackbar.customSnackBar
import com.going.presentation.profile.edit.ProfileEditActivity
import com.going.presentation.profile.trip.tripprofiletag.profiletag.TripProfileTagFragment
import com.going.presentation.tendency.result.UserTendencyResultList
Expand Down Expand Up @@ -56,7 +56,7 @@ class ParticipantProfileActivity :

private fun observeParticipantProfileState() {
participantProfileViewModel.participantProfile.flowWithLifecycle(lifecycle).onEach {
it?.let { bindData(it) } ?: toast(getString(R.string.server_error))
it?.let { bindData(it) } ?: customSnackBar(binding.root, getString(R.string.server_error))
}.launchIn(lifecycleScope)
}

Expand Down Expand Up @@ -115,7 +115,8 @@ class ParticipantProfileActivity :

if (this) binding.appbarTripProfile.setExpanded(true)

val myFragment = supportFragmentManager.findFragmentByTag("f" + binding.vpTripProfile.currentItem)
val myFragment =
supportFragmentManager.findFragmentByTag("f" + binding.vpTripProfile.currentItem)
if (myFragment is TripProfileTagFragment) myFragment.scrollTop()
}

Expand Down

0 comments on commit 75ff1bd

Please sign in to comment.