feat: more thumbnails, descriptions (thanks to @yupcm)
This commit is contained in:
parent
11655bd38d
commit
8822ef6805
25 changed files with 279 additions and 101 deletions
|
@ -101,6 +101,14 @@ class AnilistMutations {
|
||||||
return errors?.toString()
|
return errors?.toString()
|
||||||
?: (currContext()?.getString(ani.dantotsu.R.string.success) ?: "Success")
|
?: (currContext()?.getString(ani.dantotsu.R.string.success) ?: "Success")
|
||||||
}
|
}
|
||||||
|
suspend fun postMessage(userId: Int, text: String, edit: Int? = null,isPrivate: Boolean = false): String {
|
||||||
|
val encodedText = text.stringSanitizer()
|
||||||
|
val query = "mutation{SaveMessageActivity(${if (edit != null) "id:$edit," else ""} recipientId:$userId,message:$encodedText,private:$isPrivate){id}}"
|
||||||
|
val result = executeQuery<JsonObject>(query)
|
||||||
|
val errors = result?.get("errors")
|
||||||
|
return errors?.toString()
|
||||||
|
?: (currContext()?.getString(ani.dantotsu.R.string.success) ?: "Success")
|
||||||
|
}
|
||||||
suspend fun postReply(activityId: Int, text: String, edit: Int? = null ): String {
|
suspend fun postReply(activityId: Int, text: String, edit: Int? = null ): String {
|
||||||
val encodedText = text.stringSanitizer()
|
val encodedText = text.stringSanitizer()
|
||||||
val query = "mutation{SaveActivityReply(${if (edit != null) "id:$edit," else ""} activityId:$activityId,text:$encodedText){id}}"
|
val query = "mutation{SaveActivityReply(${if (edit != null) "id:$edit," else ""} activityId:$activityId,text:$encodedText){id}}"
|
||||||
|
|
|
@ -6,6 +6,7 @@ import ani.dantotsu.checkGenreTime
|
||||||
import ani.dantotsu.checkId
|
import ani.dantotsu.checkId
|
||||||
import ani.dantotsu.connections.anilist.Anilist.authorRoles
|
import ani.dantotsu.connections.anilist.Anilist.authorRoles
|
||||||
import ani.dantotsu.connections.anilist.Anilist.executeQuery
|
import ani.dantotsu.connections.anilist.Anilist.executeQuery
|
||||||
|
import ani.dantotsu.connections.anilist.api.Activity
|
||||||
import ani.dantotsu.connections.anilist.api.FeedResponse
|
import ani.dantotsu.connections.anilist.api.FeedResponse
|
||||||
import ani.dantotsu.connections.anilist.api.FuzzyDate
|
import ani.dantotsu.connections.anilist.api.FuzzyDate
|
||||||
import ani.dantotsu.connections.anilist.api.NotificationResponse
|
import ani.dantotsu.connections.anilist.api.NotificationResponse
|
||||||
|
@ -453,13 +454,24 @@ class AnilistQueries {
|
||||||
)
|
)
|
||||||
if (user.id == Anilist.userid) {
|
if (user.id == Anilist.userid) {
|
||||||
anilistActivities.add(0, userToAdd)
|
anilistActivities.add(0, userToAdd)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
list.add(userToAdd)
|
list.add(userToAdd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (anilistActivities.isEmpty() && Anilist.token != null){
|
||||||
|
anilistActivities.add(0,
|
||||||
|
User(
|
||||||
|
Anilist.userid!!,
|
||||||
|
Anilist.username!!,
|
||||||
|
Anilist.avatar,
|
||||||
|
Anilist.bg,
|
||||||
|
activity = listOf()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
list.addAll(0, anilistActivities)
|
list.addAll(0, anilistActivities)
|
||||||
return list.toCollection(ArrayList())
|
return list.toCollection(ArrayList())
|
||||||
} else return null
|
} else return null
|
||||||
|
|
|
@ -101,7 +101,7 @@ class StatusActivity : AppCompatActivity(), StoriesCallback {
|
||||||
|
|
||||||
override fun onStoriesStart() {
|
override fun onStoriesStart() {
|
||||||
position -= 1
|
position -= 1
|
||||||
if (position >= 0) {
|
if (position >= 0 && activity[position].activity.isNotEmpty()) {
|
||||||
val key = "activities"
|
val key = "activities"
|
||||||
val watchedActivity = PrefManager.getCustomVal<Set<Int>>(key, setOf())
|
val watchedActivity = PrefManager.getCustomVal<Set<Int>>(key, setOf())
|
||||||
val startFrom = findFirstNonMatch(watchedActivity, activity[position].activity )
|
val startFrom = findFirstNonMatch(watchedActivity, activity[position].activity )
|
||||||
|
|
|
@ -5,6 +5,7 @@ import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.res.ColorStateList
|
import android.content.res.ColorStateList
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
|
import android.view.Gravity
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.MotionEvent
|
import android.view.MotionEvent
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
@ -15,6 +16,7 @@ import androidx.core.app.ActivityOptionsCompat
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.core.view.ViewCompat
|
import androidx.core.view.ViewCompat
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
|
import androidx.core.widget.NestedScrollView
|
||||||
import androidx.fragment.app.FragmentActivity
|
import androidx.fragment.app.FragmentActivity
|
||||||
import ani.dantotsu.R
|
import ani.dantotsu.R
|
||||||
import ani.dantotsu.blurImage
|
import ani.dantotsu.blurImage
|
||||||
|
|
|
@ -15,6 +15,8 @@ import ani.dantotsu.profile.ProfileActivity
|
||||||
import ani.dantotsu.profile.User
|
import ani.dantotsu.profile.User
|
||||||
import ani.dantotsu.setAnimation
|
import ani.dantotsu.setAnimation
|
||||||
import ani.dantotsu.settings.saving.PrefManager
|
import ani.dantotsu.settings.saving.PrefManager
|
||||||
|
import ani.dantotsu.snackString
|
||||||
|
import ani.dantotsu.util.MarkdownCreatorActivity
|
||||||
|
|
||||||
class UserStatusAdapter(private val user: ArrayList<User>) :
|
class UserStatusAdapter(private val user: ArrayList<User>) :
|
||||||
RecyclerView.Adapter<UserStatusAdapter.UsersViewHolder>() {
|
RecyclerView.Adapter<UserStatusAdapter.UsersViewHolder>() {
|
||||||
|
@ -23,6 +25,10 @@ class UserStatusAdapter(private val user: ArrayList<User>) :
|
||||||
RecyclerView.ViewHolder(binding.root) {
|
RecyclerView.ViewHolder(binding.root) {
|
||||||
init {
|
init {
|
||||||
itemView.setOnClickListener {
|
itemView.setOnClickListener {
|
||||||
|
if (user[bindingAdapterPosition].activity.isEmpty()) {
|
||||||
|
snackString("No activity")
|
||||||
|
return@setOnClickListener
|
||||||
|
}
|
||||||
StatusActivity.user = user
|
StatusActivity.user = user
|
||||||
ContextCompat.startActivity(
|
ContextCompat.startActivity(
|
||||||
itemView.context,
|
itemView.context,
|
||||||
|
@ -34,6 +40,14 @@ class UserStatusAdapter(private val user: ArrayList<User>) :
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
itemView.setOnLongClickListener {
|
itemView.setOnLongClickListener {
|
||||||
|
if (user[bindingAdapterPosition].id == Anilist.userid) {
|
||||||
|
ContextCompat.startActivity(
|
||||||
|
itemView.context,
|
||||||
|
Intent(itemView.context, MarkdownCreatorActivity::class.java)
|
||||||
|
.putExtra("type", "activity"),
|
||||||
|
null
|
||||||
|
)
|
||||||
|
}else{
|
||||||
ContextCompat.startActivity(
|
ContextCompat.startActivity(
|
||||||
itemView.context,
|
itemView.context,
|
||||||
Intent(
|
Intent(
|
||||||
|
@ -42,6 +56,7 @@ class UserStatusAdapter(private val user: ArrayList<User>) :
|
||||||
).putExtra("userId", user[bindingAdapterPosition].id),
|
).putExtra("userId", user[bindingAdapterPosition].id),
|
||||||
null
|
null
|
||||||
)
|
)
|
||||||
|
}
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ import androidx.core.content.ContextCompat
|
||||||
import androidx.core.util.Pair
|
import androidx.core.util.Pair
|
||||||
import androidx.core.view.ViewCompat
|
import androidx.core.view.ViewCompat
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import ani.dantotsu.copyToClipboard
|
||||||
import ani.dantotsu.databinding.ItemCharacterBinding
|
import ani.dantotsu.databinding.ItemCharacterBinding
|
||||||
import ani.dantotsu.loadImage
|
import ani.dantotsu.loadImage
|
||||||
import ani.dantotsu.setAnimation
|
import ani.dantotsu.setAnimation
|
||||||
|
@ -32,6 +33,9 @@ class CharacterAdapter(
|
||||||
binding.itemCompactRelation.text = whitespace
|
binding.itemCompactRelation.text = whitespace
|
||||||
binding.itemCompactImage.loadImage(character.image)
|
binding.itemCompactImage.loadImage(character.image)
|
||||||
binding.itemCompactTitle.text = character.name
|
binding.itemCompactTitle.text = character.name
|
||||||
|
binding.root.setOnClickListener {
|
||||||
|
copyToClipboard(character.name ?: "")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemCount(): Int = characterList.size
|
override fun getItemCount(): Int = characterList.size
|
||||||
|
|
|
@ -13,6 +13,7 @@ import ani.dantotsu.media.anime.Episode
|
||||||
import ani.dantotsu.media.anime.SelectorDialogFragment
|
import ani.dantotsu.media.anime.SelectorDialogFragment
|
||||||
import ani.dantotsu.media.manga.MangaChapter
|
import ani.dantotsu.media.manga.MangaChapter
|
||||||
import ani.dantotsu.others.AniSkip
|
import ani.dantotsu.others.AniSkip
|
||||||
|
import ani.dantotsu.others.Anify
|
||||||
import ani.dantotsu.others.Jikan
|
import ani.dantotsu.others.Jikan
|
||||||
import ani.dantotsu.others.Kitsu
|
import ani.dantotsu.others.Kitsu
|
||||||
import ani.dantotsu.parsers.AnimeSources
|
import ani.dantotsu.parsers.AnimeSources
|
||||||
|
@ -99,6 +100,15 @@ class MediaDetailsViewModel : ViewModel() {
|
||||||
if (kitsuEpisodes.value == null) kitsuEpisodes.postValue(Kitsu.getKitsuEpisodesDetails(s))
|
if (kitsuEpisodes.value == null) kitsuEpisodes.postValue(Kitsu.getKitsuEpisodesDetails(s))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private val anifyEpisodes: MutableLiveData<Map<String, Episode>> =
|
||||||
|
MutableLiveData<Map<String, Episode>>(null)
|
||||||
|
|
||||||
|
fun getAnifyEpisodes(): LiveData<Map<String, Episode>> = anifyEpisodes
|
||||||
|
suspend fun loadAnifyEpisodes(s: Int) {
|
||||||
|
tryWithSuspend {
|
||||||
|
if (anifyEpisodes.value == null) anifyEpisodes.postValue(Anify.fetchAndParseMetadata(s))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private val fillerEpisodes: MutableLiveData<Map<String, Episode>> =
|
private val fillerEpisodes: MutableLiveData<Map<String, Episode>> =
|
||||||
MutableLiveData<Map<String, Episode>>(null)
|
MutableLiveData<Map<String, Episode>>(null)
|
||||||
|
|
|
@ -26,4 +26,5 @@ data class Anime(
|
||||||
var slug: String? = null,
|
var slug: String? = null,
|
||||||
var kitsuEpisodes: Map<String, Episode>? = null,
|
var kitsuEpisodes: Map<String, Episode>? = null,
|
||||||
var fillerEpisodes: Map<String, Episode>? = null,
|
var fillerEpisodes: Map<String, Episode>? = null,
|
||||||
|
var anifyEpisodes: Map<String, Episode>? = null,
|
||||||
) : Serializable
|
) : Serializable
|
|
@ -49,6 +49,7 @@ import ani.dantotsu.media.MediaType
|
||||||
import ani.dantotsu.navBarHeight
|
import ani.dantotsu.navBarHeight
|
||||||
import ani.dantotsu.notifications.subscription.SubscriptionHelper
|
import ani.dantotsu.notifications.subscription.SubscriptionHelper
|
||||||
import ani.dantotsu.notifications.subscription.SubscriptionHelper.Companion.saveSubscription
|
import ani.dantotsu.notifications.subscription.SubscriptionHelper.Companion.saveSubscription
|
||||||
|
import ani.dantotsu.others.Anify
|
||||||
import ani.dantotsu.others.LanguageMapper
|
import ani.dantotsu.others.LanguageMapper
|
||||||
import ani.dantotsu.parsers.AnimeParser
|
import ani.dantotsu.parsers.AnimeParser
|
||||||
import ani.dantotsu.parsers.AnimeSources
|
import ani.dantotsu.parsers.AnimeSources
|
||||||
|
@ -214,8 +215,9 @@ class AnimeWatchFragment : Fragment() {
|
||||||
media.selected!!.sourceIndex = model.watchSources!!.list.lastIndex
|
media.selected!!.sourceIndex = model.watchSources!!.list.lastIndex
|
||||||
} else {
|
} else {
|
||||||
awaitAll(
|
awaitAll(
|
||||||
async { model.loadKitsuEpisodes(media) },
|
//async { model.loadKitsuEpisodes(media) }, if someday anify dies
|
||||||
async { model.loadFillerEpisodes(media) }
|
//async { model.loadFillerEpisodes(media) },
|
||||||
|
async { model.loadAnifyEpisodes(media.id)}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
model.loadEpisodes(media, media.selected!!.sourceIndex)
|
model.loadEpisodes(media, media.selected!!.sourceIndex)
|
||||||
|
@ -231,19 +233,6 @@ class AnimeWatchFragment : Fragment() {
|
||||||
val episodes = loadedEpisodes[media.selected!!.sourceIndex]
|
val episodes = loadedEpisodes[media.selected!!.sourceIndex]
|
||||||
if (episodes != null) {
|
if (episodes != null) {
|
||||||
episodes.forEach { (i, episode) ->
|
episodes.forEach { (i, episode) ->
|
||||||
fun getThumbnail(episodes: List<MediaStreamingEpisode>): List<Pair<String, FileUrl?>> {
|
|
||||||
return episodes.mapNotNull { episode ->
|
|
||||||
val regex = Regex("""Episode\s*(\d+)\s*-\s*(.*)""")
|
|
||||||
val number = episode.title?.let {
|
|
||||||
val matchResult = regex.matchEntire(it)
|
|
||||||
matchResult?.destructured?.component1()
|
|
||||||
}
|
|
||||||
number?.let { number to FileUrl[episode.thumbnail] }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
val getThumbnail = getThumbnail(media.streamingEpisodes ?: emptyList())
|
|
||||||
|
|
||||||
if (media.anime?.fillerEpisodes != null) {
|
if (media.anime?.fillerEpisodes != null) {
|
||||||
if (media.anime!!.fillerEpisodes!!.containsKey(i)) {
|
if (media.anime!!.fillerEpisodes!!.containsKey(i)) {
|
||||||
episode.title =
|
episode.title =
|
||||||
|
@ -258,11 +247,23 @@ class AnimeWatchFragment : Fragment() {
|
||||||
episode.title = if (MediaNameAdapter.removeEpisodeNumberCompletely(
|
episode.title = if (MediaNameAdapter.removeEpisodeNumberCompletely(
|
||||||
episode.title ?: ""
|
episode.title ?: ""
|
||||||
).isBlank()
|
).isBlank()
|
||||||
) media.anime!!.kitsuEpisodes!![i]?.title
|
)
|
||||||
|
media.anime!!.kitsuEpisodes!![i]?.title
|
||||||
?: episode.title else episode.title
|
?: episode.title else episode.title
|
||||||
?: media.anime!!.kitsuEpisodes!![i]?.title ?: episode.title
|
?: media.anime!!.kitsuEpisodes!![i]?.title ?: episode.title
|
||||||
episode.thumb = getThumbnail.find { it.first == i }?.second
|
episode.thumb = media.anime!!.kitsuEpisodes!![i]?.thumb ?: episode.thumb
|
||||||
?: media.anime!!.kitsuEpisodes!![i]?.thumb ?: episode.thumb
|
}
|
||||||
|
}
|
||||||
|
if (media.anime?.anifyEpisodes != null) {
|
||||||
|
if (media.anime!!.anifyEpisodes!!.containsKey(i)) {
|
||||||
|
episode.desc = media.anime!!.anifyEpisodes!![i]?.desc ?: episode.desc
|
||||||
|
episode.title = if (MediaNameAdapter.removeEpisodeNumberCompletely(
|
||||||
|
episode.title ?: ""
|
||||||
|
).isBlank()
|
||||||
|
) media.anime!!.anifyEpisodes!![i]?.title ?: episode.title else episode.title
|
||||||
|
?: media.anime!!.anifyEpisodes!![i]?.title ?: episode.title
|
||||||
|
episode.thumb = media.anime!!.anifyEpisodes!![i]?.thumb ?: episode.thumb
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -309,6 +310,10 @@ class AnimeWatchFragment : Fragment() {
|
||||||
if (i != null)
|
if (i != null)
|
||||||
media.anime?.fillerEpisodes = i
|
media.anime?.fillerEpisodes = i
|
||||||
}
|
}
|
||||||
|
model.getAnifyEpisodes().observe(viewLifecycleOwner) { i ->
|
||||||
|
if (i != null)
|
||||||
|
media.anime?.anifyEpisodes = i
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onSourceChange(i: Int): AnimeParser {
|
fun onSourceChange(i: Int): AnimeParser {
|
||||||
|
|
46
app/src/main/java/ani/dantotsu/others/Anify.kt
Normal file
46
app/src/main/java/ani/dantotsu/others/Anify.kt
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
package ani.dantotsu.others
|
||||||
|
|
||||||
|
import ani.dantotsu.FileUrl
|
||||||
|
import ani.dantotsu.Mapper
|
||||||
|
import ani.dantotsu.client
|
||||||
|
import ani.dantotsu.media.anime.Episode
|
||||||
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.json.JsonArray
|
||||||
|
import kotlinx.serialization.json.decodeFromJsonElement
|
||||||
|
|
||||||
|
object Anify {
|
||||||
|
suspend fun fetchAndParseMetadata(id :Int): Map<String, Episode>? {
|
||||||
|
val response = client.get("https://api.anify.tv/content-metadata/$id")
|
||||||
|
.parsed<JsonArray>().map {
|
||||||
|
Mapper.json.decodeFromJsonElement<ContentMetadata>(it)
|
||||||
|
}
|
||||||
|
return response.first().data.associate {
|
||||||
|
it.number.toString() to Episode(
|
||||||
|
number = it.number.toString(),
|
||||||
|
title = it.title,
|
||||||
|
desc = it.description,
|
||||||
|
thumb = FileUrl[it.img],
|
||||||
|
filler = it.isFiller,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Serializable
|
||||||
|
data class ContentMetadata(
|
||||||
|
@SerialName("providerId") val providerId: String,
|
||||||
|
@SerialName("data") val data: List<ProviderData>
|
||||||
|
)
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class ProviderData(
|
||||||
|
@SerialName("id") val id: String,
|
||||||
|
@SerialName("description") val description: String,
|
||||||
|
@SerialName("hasDub") val hasDub: Boolean,
|
||||||
|
@SerialName("img") val img: String,
|
||||||
|
@SerialName("isFiller") val isFiller: Boolean,
|
||||||
|
@SerialName("number") val number: Int,
|
||||||
|
@SerialName("title") val title: String,
|
||||||
|
@SerialName("updatedAt") val updatedAt: Long,
|
||||||
|
@SerialName("rating") val rating: Double? = null
|
||||||
|
)
|
||||||
|
}
|
|
@ -157,15 +157,6 @@ class ProfileActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedListene
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
R.id.action_create_new_activity -> {
|
|
||||||
ContextCompat.startActivity(
|
|
||||||
context,
|
|
||||||
Intent(context, MarkdownCreatorActivity::class.java)
|
|
||||||
.putExtra("type", "activity"),
|
|
||||||
null
|
|
||||||
)
|
|
||||||
true
|
|
||||||
}
|
|
||||||
|
|
||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ import ani.dantotsu.media.MediaDetailsActivity
|
||||||
import ani.dantotsu.navBarHeight
|
import ani.dantotsu.navBarHeight
|
||||||
import ani.dantotsu.profile.ProfileActivity
|
import ani.dantotsu.profile.ProfileActivity
|
||||||
import ani.dantotsu.setBaseline
|
import ani.dantotsu.setBaseline
|
||||||
|
import ani.dantotsu.util.MarkdownCreatorActivity
|
||||||
import com.xwray.groupie.GroupieAdapter
|
import com.xwray.groupie.GroupieAdapter
|
||||||
import eu.kanade.tachiyomi.util.system.getSerializableCompat
|
import eu.kanade.tachiyomi.util.system.getSerializableCompat
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
@ -46,6 +47,27 @@ class ActivityFragment : Fragment() {
|
||||||
type = arguments?.getSerializableCompat<ActivityType>("type") as ActivityType
|
type = arguments?.getSerializableCompat<ActivityType>("type") as ActivityType
|
||||||
userId = arguments?.getInt("userId")
|
userId = arguments?.getInt("userId")
|
||||||
activityId = arguments?.getInt("activityId")
|
activityId = arguments?.getInt("activityId")
|
||||||
|
binding.titleBar.visibility = if (type == ActivityType.OTHER_USER) View.VISIBLE else View.GONE
|
||||||
|
binding.titleText.text = if (userId == Anilist.userid) getString(R.string.create_new_activity) else getString(R.string.write_a_message)
|
||||||
|
binding.titleImage.setOnClickListener {
|
||||||
|
if(userId == Anilist.userid) {
|
||||||
|
ContextCompat.startActivity(
|
||||||
|
requireContext(),
|
||||||
|
Intent(context, MarkdownCreatorActivity::class.java)
|
||||||
|
.putExtra("type", "activity"),
|
||||||
|
null
|
||||||
|
)
|
||||||
|
} else{
|
||||||
|
ContextCompat.startActivity(
|
||||||
|
requireContext(),
|
||||||
|
Intent(context, MarkdownCreatorActivity::class.java)
|
||||||
|
.putExtra("type", "message")
|
||||||
|
.putExtra("userId", userId),
|
||||||
|
|
||||||
|
null
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
binding.listRecyclerView.adapter = adapter
|
binding.listRecyclerView.adapter = adapter
|
||||||
binding.listRecyclerView.layoutManager = LinearLayoutManager(context)
|
binding.listRecyclerView.layoutManager = LinearLayoutManager(context)
|
||||||
binding.listProgressBar.isVisible = true
|
binding.listProgressBar.isVisible = true
|
||||||
|
@ -53,7 +75,7 @@ class ActivityFragment : Fragment() {
|
||||||
binding.feedRefresh.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
binding.feedRefresh.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||||
bottomMargin = navBarHeight
|
bottomMargin = navBarHeight
|
||||||
}
|
}
|
||||||
binding.emptyTextView.text = getString(R.string.no_notifications)
|
binding.emptyTextView.text = getString(R.string.no_activities)
|
||||||
lifecycleScope.launch {
|
lifecycleScope.launch {
|
||||||
getList()
|
getList()
|
||||||
if (adapter.itemCount == 0) {
|
if (adapter.itemCount == 0) {
|
||||||
|
@ -87,8 +109,8 @@ class ActivityFragment : Fragment() {
|
||||||
|
|
||||||
private suspend fun getList() {
|
private suspend fun getList() {
|
||||||
val list = when (type) {
|
val list = when (type) {
|
||||||
ActivityType.GLOBAL -> getActivities(true)
|
ActivityType.GLOBAL -> getActivities(global = true)
|
||||||
ActivityType.USER -> getActivities()
|
ActivityType.USER -> getActivities(filter = true)
|
||||||
ActivityType.OTHER_USER -> getActivities(userId = userId)
|
ActivityType.OTHER_USER -> getActivities(userId = userId)
|
||||||
ActivityType.ONE -> getActivities(activityId = activityId)
|
ActivityType.ONE -> getActivities(activityId = activityId)
|
||||||
}
|
}
|
||||||
|
@ -99,12 +121,13 @@ class ActivityFragment : Fragment() {
|
||||||
global: Boolean = false,
|
global: Boolean = false,
|
||||||
userId: Int? = null,
|
userId: Int? = null,
|
||||||
activityId: Int? = null,
|
activityId: Int? = null,
|
||||||
|
filter:Boolean = false
|
||||||
): List<Activity> {
|
): List<Activity> {
|
||||||
val res = Anilist.query.getFeed(userId, global, page, activityId)?.data?.page?.activities
|
val res = Anilist.query.getFeed(userId, global, page, activityId)?.data?.page?.activities
|
||||||
page += 1
|
page += 1
|
||||||
return res
|
return res
|
||||||
?.filter { if (Anilist.adult) true else it.media?.isAdult != true }
|
?.filter { if (Anilist.adult) true else it.media?.isAdult != true }
|
||||||
?.filterNot { it.recipient?.id != null && it.recipient.id != Anilist.userid }
|
?.filterNot { it.recipient?.id != null && it.recipient.id != Anilist.userid && filter }
|
||||||
?: emptyList()
|
?: emptyList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,12 +68,10 @@ class ActivityItem(
|
||||||
}
|
}
|
||||||
binding.activityLikeCount.text = (activity.likeCount ?: 0).toString()
|
binding.activityLikeCount.text = (activity.likeCount ?: 0).toString()
|
||||||
binding.activityLikeContainer.setOnClickListener {
|
binding.activityLikeContainer.setOnClickListener {
|
||||||
|
|
||||||
scope.launch {
|
scope.launch {
|
||||||
val res = Anilist.mutation.toggleLike(activity.id, "ACTIVITY")
|
val res = Anilist.mutation.toggleLike(activity.id, "ACTIVITY")
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
if (res != null) {
|
if (res != null) {
|
||||||
|
|
||||||
if (activity.isLiked == true) {
|
if (activity.isLiked == true) {
|
||||||
activity.likeCount = activity.likeCount?.minus(1)
|
activity.likeCount = activity.likeCount?.minus(1)
|
||||||
} else {
|
} else {
|
||||||
|
@ -89,7 +87,7 @@ class ActivityItem(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
binding.activityDelete.isVisible = activity.userId == Anilist.userid
|
binding.activityDelete.isVisible = activity.userId == Anilist.userid || activity.messenger?.id == Anilist.userid
|
||||||
binding.activityDelete.setOnClickListener {
|
binding.activityDelete.setOnClickListener {
|
||||||
scope.launch {
|
scope.launch {
|
||||||
val res = Anilist.mutation.deleteActivity(activity.id)
|
val res = Anilist.mutation.deleteActivity(activity.id)
|
||||||
|
@ -109,6 +107,7 @@ class ActivityItem(
|
||||||
val banner = activity.media?.bannerImage
|
val banner = activity.media?.bannerImage
|
||||||
binding.activityContent.visibility = View.GONE
|
binding.activityContent.visibility = View.GONE
|
||||||
binding.activityBannerContainer.visibility = View.VISIBLE
|
binding.activityBannerContainer.visibility = View.VISIBLE
|
||||||
|
binding.activityPrivate.visibility = View.GONE
|
||||||
binding.activityMediaName.text = activity.media?.title?.userPreferred
|
binding.activityMediaName.text = activity.media?.title?.userPreferred
|
||||||
val activityText = "${activity.user!!.name} ${activity.status} ${
|
val activityText = "${activity.user!!.name} ${activity.status} ${
|
||||||
activity.progress
|
activity.progress
|
||||||
|
@ -135,6 +134,7 @@ class ActivityItem(
|
||||||
"TextActivity" -> {
|
"TextActivity" -> {
|
||||||
binding.activityBannerContainer.visibility = View.GONE
|
binding.activityBannerContainer.visibility = View.GONE
|
||||||
binding.activityContent.visibility = View.VISIBLE
|
binding.activityContent.visibility = View.VISIBLE
|
||||||
|
binding.activityPrivate.visibility = View.GONE
|
||||||
if (!(context as android.app.Activity).isDestroyed) {
|
if (!(context as android.app.Activity).isDestroyed) {
|
||||||
val markwon = buildMarkwon(context, false)
|
val markwon = buildMarkwon(context, false)
|
||||||
markwon.setMarkdown(
|
markwon.setMarkdown(
|
||||||
|
@ -164,6 +164,7 @@ class ActivityItem(
|
||||||
"MessageActivity" -> {
|
"MessageActivity" -> {
|
||||||
binding.activityBannerContainer.visibility = View.GONE
|
binding.activityBannerContainer.visibility = View.GONE
|
||||||
binding.activityContent.visibility = View.VISIBLE
|
binding.activityContent.visibility = View.VISIBLE
|
||||||
|
binding.activityPrivate.visibility = if (activity.isPrivate == true) View.VISIBLE else View.GONE
|
||||||
if (!(context as android.app.Activity).isDestroyed) {
|
if (!(context as android.app.Activity).isDestroyed) {
|
||||||
val markwon = buildMarkwon(context, false)
|
val markwon = buildMarkwon(context, false)
|
||||||
markwon.setMarkdown(
|
markwon.setMarkdown(
|
||||||
|
@ -178,6 +179,18 @@ class ActivityItem(
|
||||||
clickCallback(activity.messengerId ?: -1, "USER")
|
clickCallback(activity.messengerId ?: -1, "USER")
|
||||||
}
|
}
|
||||||
binding.activityEdit.isVisible = false
|
binding.activityEdit.isVisible = false
|
||||||
|
binding.activityEdit.isVisible = activity.messenger?.id == Anilist.userid
|
||||||
|
binding.activityEdit.setOnClickListener {
|
||||||
|
ContextCompat.startActivity(
|
||||||
|
context,
|
||||||
|
Intent(context, MarkdownCreatorActivity::class.java)
|
||||||
|
.putExtra("type", "message")
|
||||||
|
.putExtra("other", activity.message)
|
||||||
|
.putExtra("edit", activity.id)
|
||||||
|
.putExtra("userId", activity.recipientId),
|
||||||
|
null
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,10 +90,8 @@ class AniMarkdown { //istg anilist has the worst api
|
||||||
/* Add responsive design elements for other content as needed */
|
/* Add responsive design elements for other content as needed */
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>$basicHtml</body>
|
||||||
$basicHtml
|
</html>
|
||||||
</body>
|
|
||||||
|
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
return returnHtml
|
return returnHtml
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,7 @@ class MarkdownCreatorActivity : AppCompatActivity() {
|
||||||
binding.markdownCreatorTitle.text = when (type) {
|
binding.markdownCreatorTitle.text = when (type) {
|
||||||
"activity" -> getString(R.string.create_new_activity)
|
"activity" -> getString(R.string.create_new_activity)
|
||||||
"review" -> getString(R.string.create_new_review)
|
"review" -> getString(R.string.create_new_review)
|
||||||
|
"message" -> getString(R.string.create_new_message)
|
||||||
"replyActivity" -> {
|
"replyActivity" -> {
|
||||||
parentId = intent.getIntExtra("parentId", -1)
|
parentId = intent.getIntExtra("parentId", -1)
|
||||||
if (parentId == -1) {
|
if (parentId == -1) {
|
||||||
|
@ -64,6 +65,7 @@ class MarkdownCreatorActivity : AppCompatActivity() {
|
||||||
else -> ""
|
else -> ""
|
||||||
}
|
}
|
||||||
ping = intent.getStringExtra("other")
|
ping = intent.getStringExtra("other")
|
||||||
|
val userId = intent.getIntExtra("userId", -1)
|
||||||
text = ping ?: ""
|
text = ping ?: ""
|
||||||
binding.editText.setText(text)
|
binding.editText.setText(text)
|
||||||
binding.editText.addTextChangedListener {
|
binding.editText.addTextChangedListener {
|
||||||
|
@ -106,7 +108,11 @@ class MarkdownCreatorActivity : AppCompatActivity() {
|
||||||
} else {
|
} else {
|
||||||
Anilist.mutation.postReply(parentId, text)
|
Anilist.mutation.postReply(parentId, text)
|
||||||
}
|
}
|
||||||
|
"message" -> if (isEdit) { //TODO private
|
||||||
|
Anilist.mutation.postMessage(userId , text, editId)
|
||||||
|
} else {
|
||||||
|
Anilist.mutation.postMessage(userId , text)
|
||||||
|
}
|
||||||
else -> "Error: Unknown type"
|
else -> "Error: Unknown type"
|
||||||
}
|
}
|
||||||
toast(success)
|
toast(success)
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
android:id="@+id/homeUserAvatarContainer"
|
android:id="@+id/homeUserAvatarContainer"
|
||||||
android:layout_width="52dp"
|
android:layout_width="52dp"
|
||||||
android:layout_height="52dp"
|
android:layout_height="52dp"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_margin="4dp"
|
||||||
android:backgroundTint="@color/nav_bg_inv"
|
android:backgroundTint="@color/nav_bg_inv"
|
||||||
app:cardCornerRadius="26dp">
|
app:cardCornerRadius="26dp">
|
||||||
|
|
||||||
|
@ -165,7 +165,6 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginEnd="58dp"
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
@ -178,7 +177,7 @@
|
||||||
android:insetBottom="0dp"
|
android:insetBottom="0dp"
|
||||||
android:paddingStart="32dp"
|
android:paddingStart="32dp"
|
||||||
android:paddingEnd="32dp"
|
android:paddingEnd="32dp"
|
||||||
android:text="Activity"
|
android:text="@string/activities"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="?attr/colorOnBackground"
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -19,10 +20,39 @@
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/titleBar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="16dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:ignore="UseCompoundDrawables">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/titleText"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/titleImage"
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:contentDescription="@string/reply"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:src="@drawable/ic_add"
|
||||||
|
app:tint="?attr/colorPrimary" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/emptyTextView"
|
android:id="@+id/emptyTextView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -315,6 +315,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:minHeight="100dp"
|
android:minHeight="100dp"
|
||||||
|
android:layout_marginVertical="8dp"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal"
|
||||||
tools:ignore="ContentDescription">
|
tools:ignore="ContentDescription">
|
||||||
|
|
||||||
<com.flaviofaria.kenburnsview.KenBurnsView
|
<com.flaviofaria.kenburnsview.KenBurnsView
|
||||||
|
@ -39,23 +40,29 @@
|
||||||
android:id="@+id/textActivityContainer"
|
android:id="@+id/textActivityContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginHorizontal="16dp"
|
android:layout_marginTop="88dp"
|
||||||
android:layout_marginVertical="94dp"
|
android:layout_marginBottom="108dp"
|
||||||
android:clipToPadding="false"
|
android:fillViewport="true"
|
||||||
|
android:requiresFadingEdge="vertical"
|
||||||
android:scrollbars="none">
|
android:scrollbars="none">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingHorizontal="16dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textActivity"
|
android:id="@+id/textActivity"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center_vertical"
|
||||||
android:fontFamily="@font/poppins_semi_bold"
|
android:fontFamily="@font/poppins_semi_bold"
|
||||||
android:paddingHorizontal="12dp"
|
android:gravity="center"
|
||||||
android:text="test"
|
android:text="@string/lorem_ipsum"
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="@color/bg_white"
|
android:textColor="@color/bg_white"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
tools:ignore="HardcodedText" />
|
tools:ignore="HardcodedText" />
|
||||||
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
|
|
||||||
|
@ -129,7 +136,7 @@
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/statusUserTime"
|
android:id="@+id/statusUserTime"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="6dp"
|
android:layout_marginEnd="6dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
@ -147,14 +154,11 @@
|
||||||
android:id="@+id/itemCompactCard"
|
android:id="@+id/itemCompactCard"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="124dp"
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginBottom="32dp"
|
||||||
android:translationZ="8dp"
|
android:translationZ="8dp"
|
||||||
app:cardCornerRadius="16dp"
|
app:cardCornerRadius="16dp"
|
||||||
app:cardElevation="4dp"
|
app:cardElevation="4dp">
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<com.google.android.material.imageview.ShapeableImageView
|
<com.google.android.material.imageview.ShapeableImageView
|
||||||
android:id="@+id/coverImage"
|
android:id="@+id/coverImage"
|
||||||
|
@ -172,12 +176,10 @@
|
||||||
android:id="@+id/linearLayout"
|
android:id="@+id/linearLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
android:layout_marginHorizontal="16dp"
|
android:layout_marginHorizontal="16dp"
|
||||||
android:layout_marginVertical="32dp"
|
android:layout_marginVertical="32dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal">
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/infoText"
|
android:id="@+id/infoText"
|
||||||
|
@ -256,12 +258,9 @@
|
||||||
android:id="@+id/androidStoriesLoadingView"
|
android:id="@+id/androidStoriesLoadingView"
|
||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:indeterminate="true"
|
android:indeterminate="true"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</FrameLayout>
|
|
@ -66,8 +66,19 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fontFamily="@font/poppins_semi_bold"
|
android:fontFamily="@font/poppins_semi_bold"
|
||||||
android:text="@string/time"
|
android:text="@string/time"
|
||||||
|
android:layout_marginEnd="4dp"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
tools:ignore="HardcodedText" />
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/activityPrivate"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:padding="4dp"
|
||||||
|
android:alpha="0.6"
|
||||||
|
android:src="@drawable/ic_round_lock_24"
|
||||||
|
tools:tint="@color/bg_opp"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -87,7 +98,7 @@
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/replyCount"
|
android:id="@+id/replyCount"
|
||||||
android:layout_width="18dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:fontFamily="@font/poppins_semi_bold"
|
android:fontFamily="@font/poppins_semi_bold"
|
||||||
|
@ -114,7 +125,7 @@
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/activityLikeCount"
|
android:id="@+id/activityLikeCount"
|
||||||
android:layout_width="18dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:fontFamily="@font/poppins_semi_bold"
|
android:fontFamily="@font/poppins_semi_bold"
|
||||||
|
@ -134,11 +145,13 @@
|
||||||
android:fontFamily="@font/poppins_semi_bold"
|
android:fontFamily="@font/poppins_semi_bold"
|
||||||
android:text="@string/lorem_ipsum"
|
android:text="@string/lorem_ipsum"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/linearLayout6"
|
android:id="@+id/linearLayout6"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="52dp"
|
android:layout_marginStart="52dp"
|
||||||
|
android:layout_marginTop="-12dp"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -152,8 +165,8 @@
|
||||||
android:text="@string/delete"
|
android:text="@string/delete"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible"
|
tools:ignore="HardcodedText"
|
||||||
tools:ignore="HardcodedText" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/activityEdit"
|
android:id="@+id/activityEdit"
|
||||||
|
@ -166,14 +179,15 @@
|
||||||
android:text="@string/edit"
|
android:text="@string/edit"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible"
|
tools:ignore="HardcodedText"
|
||||||
tools:ignore="HardcodedText" />
|
tools:visibility="visible" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/activityBannerContainer"
|
android:id="@+id/activityBannerContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="12dp"
|
||||||
android:visibility="visible">
|
android:visibility="visible">
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
|
|
|
@ -46,7 +46,8 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="4dp"
|
android:layout_marginEnd="4dp"
|
||||||
android:fontFamily="@font/poppins_semi_bold"
|
android:fontFamily="@font/poppins_semi_bold"
|
||||||
android:text="Username"
|
tools:text="@string/username"
|
||||||
|
android:maxLines="1"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
tools:ignore="HardcodedText,RtlSymmetry" />
|
tools:ignore="HardcodedText,RtlSymmetry" />
|
||||||
|
|
||||||
|
@ -65,7 +66,8 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fontFamily="@font/poppins_semi_bold"
|
android:fontFamily="@font/poppins_semi_bold"
|
||||||
android:text="@string/time"
|
tools:text="Time"
|
||||||
|
android:maxLines="1"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
tools:ignore="HardcodedText" />
|
tools:ignore="HardcodedText" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -74,7 +76,7 @@
|
||||||
android:id="@+id/activityLikeContainer"
|
android:id="@+id/activityLikeContainer"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="12dp"
|
android:layout_marginEnd="20dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:ignore="UseCompoundDrawables">
|
tools:ignore="UseCompoundDrawables">
|
||||||
|
|
||||||
|
@ -112,6 +114,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="52dp"
|
android:layout_marginStart="52dp"
|
||||||
|
android:layout_marginTop="-12dp"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
|
@ -13,12 +13,12 @@
|
||||||
android:layout_gravity="start|center_vertical"
|
android:layout_gravity="start|center_vertical"
|
||||||
android:backgroundTint="@color/bg_white"
|
android:backgroundTint="@color/bg_white"
|
||||||
app:cardCornerRadius="24dp"
|
app:cardCornerRadius="24dp"
|
||||||
app:strokeColor="@color/transparent">
|
app:strokeWidth="0dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/profileBannerImage"
|
android:id="@+id/profileBannerImage"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="89dp"
|
android:layout_height="90dp"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
tools:ignore="ContentDescription"
|
tools:ignore="ContentDescription"
|
||||||
tools:srcCompat="@tools:sample/backgrounds/scenic" />
|
tools:srcCompat="@tools:sample/backgrounds/scenic" />
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView"
|
android:id="@+id/imageView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="92dp"
|
||||||
app:srcCompat="@drawable/linear_gradient_nav"
|
app:srcCompat="@drawable/linear_gradient_nav"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/profileUserName"
|
android:id="@+id/profileUserName"
|
||||||
android:layout_width="64dp"
|
android:layout_width="64dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal|center_vertical"
|
android:layout_gravity="center_horizontal|center_vertical"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
|
|
|
@ -7,9 +7,4 @@
|
||||||
android:title="@string/view_on_anilist"
|
android:title="@string/view_on_anilist"
|
||||||
app:showAsAction="never" />
|
app:showAsAction="never" />
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/action_create_new_activity"
|
|
||||||
android:title="@string/create_new_activity"
|
|
||||||
app:showAsAction="never" />
|
|
||||||
|
|
||||||
</menu>
|
</menu>
|
|
@ -84,8 +84,9 @@
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string name="no_notifications">No more notifications</string>
|
<string name="no_notifications">No more notifications</string>
|
||||||
|
<string name="no_activities">No more activities</string>
|
||||||
<string name="followers">Followers</string>
|
<string name="followers">Followers</string>
|
||||||
|
<string name="write_a_message">Write a Message</string>
|
||||||
<string name="status">STATUS</string>
|
<string name="status">STATUS</string>
|
||||||
<string-array name="status" translatable="false">
|
<string-array name="status" translatable="false">
|
||||||
<item>PLANNING</item>
|
<item>PLANNING</item>
|
||||||
|
@ -984,6 +985,7 @@ Non quae tempore quo provident laudantium qui illo dolor vel quia dolor et exerc
|
||||||
<string name="create_new_activity">Create New Activity</string>
|
<string name="create_new_activity">Create New Activity</string>
|
||||||
<string name="create_new_review">Create New Review</string>
|
<string name="create_new_review">Create New Review</string>
|
||||||
<string name="create_new_reply">Create New Reply</string>
|
<string name="create_new_reply">Create New Reply</string>
|
||||||
|
<string name="create_new_message">Create New Message</string>
|
||||||
<string name="create">Create</string>
|
<string name="create">Create</string>
|
||||||
<string name="preview">Preview</string>
|
<string name="preview">Preview</string>
|
||||||
<string name="cannot_be_empty">Text cannot be empty</string>
|
<string name="cannot_be_empty">Text cannot be empty</string>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue