fix: data loading glitches (#284)

* fix: the obnoxious loading glitch

* chore: some quick build warnings
This commit is contained in:
TwistedUmbrellaX 2024-03-24 17:09:26 -04:00 committed by GitHub
parent dc21d28b83
commit f704e322af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
43 changed files with 117 additions and 109 deletions

View file

@ -9,6 +9,7 @@ import android.view.ViewGroup
import android.widget.PopupMenu
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import androidx.core.view.isGone
import androidx.core.view.updateLayoutParams
import androidx.core.view.updateMargins
import androidx.fragment.app.Fragment
@ -108,8 +109,7 @@ class ProfileActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedListene
}
})
val userLevel = intent.getStringExtra("userLVL") ?: ""
binding.followButton.visibility =
if (user.id == Anilist.userid || Anilist.userid == null) View.GONE else View.VISIBLE
binding.followButton.isGone = user.id == Anilist.userid || Anilist.userid == null
binding.followButton.text = getString(
when {
user.isFollowing -> R.string.unfollow