mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 11:46:32 +00:00
Fix release breaking issues
This commit is contained in:
parent
c28ef23760
commit
f2c21c0604
54 changed files with 1942 additions and 81 deletions
|
|
@ -60,11 +60,9 @@ dependencies {
|
|||
compileOnly 'com.github.pengrad:jdk9-deps:1.0'
|
||||
//App Compatibility and Material Design
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'com.google.android.material:material:1.2.0'
|
||||
implementation 'com.google.android.material:material:1.2.1'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
|
||||
// Emojis
|
||||
implementation 'com.github.viirus:emoji-lib:0.0.5'
|
||||
// Markdown
|
||||
implementation "io.noties.markwon:core:4.2.0"
|
||||
implementation "io.noties.markwon:ext-strikethrough:4.2.0"
|
||||
|
|
@ -158,7 +156,7 @@ android {
|
|||
multiDexEnabled true
|
||||
resConfigs "en", "bg", "de", "en-rGB", "es", "fr", "hr-rHR", "in", "it", "iw", "ja", "ko", "lt", "nl", "pl", "pt-rBR", "pt-rPT", "ru", "tr", "zh", "zh-rTW"
|
||||
|
||||
versionCode 2557
|
||||
versionCode 2561
|
||||
versionName "3.0"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="?colorPrimaryOffset" />
|
||||
<solid android:color="@color/brand_200" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:left="0dp" android:right="0dp" android:gravity="bottom">
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="?colorPrimary" />
|
||||
<solid android:color="@color/brand" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:left="0dp" android:right="0dp" android:gravity="bottom">
|
||||
|
|
|
|||
|
|
@ -16,9 +16,8 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:theme="@style/Toolbar"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark"/>
|
||||
android:theme="@style/Toolbar.Modern"
|
||||
app:layout_scrollFlags="scroll|enterAlways"/>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
<ScrollView android:layout_width="match_parent"
|
||||
|
|
@ -266,7 +265,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/transparent"
|
||||
android:background="@drawable/layout_rounded_bg_window"
|
||||
android:hint="@string/streak_label"
|
||||
android:paddingStart="16dp">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@
|
|||
android:layout_centerHorizontal="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:background="@color/brand_300"
|
||||
android:paddingStart="@dimen/content_inset"
|
||||
android:paddingEnd="@dimen/content_inset"
|
||||
android:background="@color/background_brand"
|
||||
android:gravity="center_vertical"
|
||||
android:elevation="8dp">
|
||||
<Button
|
||||
|
|
@ -40,7 +38,6 @@
|
|||
android:textColor="@color/white"
|
||||
android:drawableEnd="@drawable/forward_arrow_enabled"
|
||||
android:background="@color/transparent"
|
||||
android:layout_alignEnd="@id/previousButton"
|
||||
android:layout_alignParentEnd="true"/>
|
||||
|
||||
<com.viewpagerindicator.IconPageIndicator
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
app:tabIndicatorHeight="2dp"
|
||||
app:tabTextColor="@color/white_50_alpha"
|
||||
app:tabSelectedTextColor="@color/white"
|
||||
android:background="@color/brand"
|
||||
app:tabGravity="center"
|
||||
app:tabPaddingEnd="24dp"
|
||||
app:tabPaddingStart="24dp"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content">
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/input_layout"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
|
|
@ -107,12 +107,13 @@
|
|||
tools:text="This is a small label"
|
||||
tools:visibility="visible"/>
|
||||
</LinearLayout>
|
||||
<Button
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/close_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/close"
|
||||
android:background="@drawable/alert_dialog_background"
|
||||
android:backgroundTint="@color/content_background"
|
||||
android:layout_marginTop="@dimen/spacing_large"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
<Button
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/randomize_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/randomize"
|
||||
style="@style/DiamondButton" />
|
||||
style="@style/DiamondButton"/>
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
|||
|
|
@ -18,6 +18,27 @@
|
|||
style="@style/SectionHeaderCaps"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/known_issues_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/layout_rounded_bg_window"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:divider="?android:listDivider"
|
||||
android:orientation="vertical"
|
||||
android:showDividers="middle" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/common_fixes"
|
||||
android:layout_marginStart="@dimen/spacing_large"
|
||||
android:layout_marginTop="@dimen/spacing_large"
|
||||
android:layout_marginBottom="12dp"
|
||||
style="@style/SectionHeaderCaps"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
|||
|
|
@ -23,10 +23,11 @@
|
|||
android:layout_marginBottom="@dimen/spacing_large"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
<com.habitrpg.android.habitica.ui.views.DayNightTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/brand_200"
|
||||
app:dayTextColor="@color/brand_200"
|
||||
app:nightTextColor="@color/brand_500"
|
||||
android:text="@string/welcomeNameTitle"
|
||||
android:gravity="center"
|
||||
android:textSize="16sp"
|
||||
|
|
|
|||
10
Habitica/res/layout/known_issue.xml
Normal file
10
Habitica/res/layout/known_issue.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="@dimen/spacing_large"
|
||||
android:paddingVertical="12dp"
|
||||
android:textColor="@color/text_primary"
|
||||
tools:text="Test name" />
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
android:layout_weight="1"
|
||||
app:hintTextAppearance="@style/TextAppearance.AppCompat">
|
||||
|
||||
<net.pherth.android.emoji_library.EmojiEditText
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/edit_new_message_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Button xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.appcompat.widget.AppCompatButton xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/textView"
|
||||
android:layout_height="36dp"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
tools:context="com.habitrpg.android.habitica.TaskActivity">
|
||||
|
||||
<item android:id="@+id/send_message"
|
||||
android:icon="@drawable/menu_messages"
|
||||
android:title="@string/send_message"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
||||
|
|
|
|||
|
|
@ -209,7 +209,16 @@
|
|||
android:label="@string/sidebar_help" >
|
||||
<argument
|
||||
android:name="position"
|
||||
app:argType="integer" />
|
||||
app:argType="integer"
|
||||
android:defaultValue="0"/>
|
||||
<argument
|
||||
android:name="question"
|
||||
app:argType="string"
|
||||
app:nullable="true"/>
|
||||
<argument
|
||||
android:name="answer"
|
||||
app:argType="string"
|
||||
app:nullable="true"/>
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/aboutFragment"
|
||||
|
|
|
|||
15
Habitica/res/values-night/styles.xml
Normal file
15
Habitica/res/values-night/styles.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="DiamondButton" parent="@style/Widget.AppCompat.Button.Borderless">
|
||||
<item name="android:layout_height">36dp</item>
|
||||
<item name="android:background">@drawable/diamond_button</item>
|
||||
<item name="backgroundTint">@color/brand_400</item>
|
||||
<item name="android:paddingStart">36dp</item>
|
||||
<item name="android:paddingEnd">36dp</item>
|
||||
<item name="android:paddingTop">0dp</item>
|
||||
<item name="android:paddingBottom">0dp</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
<item name="android:shadowColor">@color/transparent</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
@ -140,8 +140,8 @@
|
|||
<color name="reward_buy_button_text">#D9784A00</color>
|
||||
<color name="ic_launcher_background">#331960</color>
|
||||
<color name="scrollbarThumb">@color/content_background_offset</color>
|
||||
<color name="setup_background">#efeff4</color>
|
||||
<color name="setup_label_background">#fafaff</color>
|
||||
<color name="setup_background">@color/window_background</color>
|
||||
<color name="setup_label_background">@color/offset_background_30</color>
|
||||
<color name="animalitem_all_eggs">#6ECDB2</color>
|
||||
|
||||
<color name="dark_brown">#794b00</color>
|
||||
|
|
|
|||
|
|
@ -572,8 +572,8 @@
|
|||
<string name="reset_account">Reset Account</string>
|
||||
<string name="reset_account_description">WARNING! This resets many parts of your account. This is highly discouraged, but some people find it useful in the beginning after playing with the site for a short time.\n\nYou will lose all your levels, gold, and experience points. All your tasks (except those from challenges) will be deleted permanently and you will lose all of their historical data. You will lose all your equipment but you will be able to buy it all back, including all limited edition equipment or subscriber Mystery items that you already own (you will need to be in the correct class to re-buy class-specific gear). You will keep your current class and your pets and mounts. You might prefer to use an Orb of Rebirth instead, which is a much safer option and which will preserve your tasks and equipment.</string>
|
||||
<string name="delete_account">Delete Account</string>
|
||||
<string name="delete_account_description">This will delete your account forever, and it can never be restored! Banked or spent Gems will not be refunded. If you’re absolutely certain, type your password into the text box below.</string>
|
||||
<string name="delete_oauth_account_description">This will delete your account forever, and it can never be restored! Banked or spent Gems will not be refunded. If you’re absolutely certain, type DELETE into the text box below.</string>
|
||||
<string name="delete_account_description">Deleted accounts are permanent and cannot be restored. Gems cannot be refunded. If you still want to delete, type your password below.</string>
|
||||
<string name="delete_oauth_account_description">Deleted accounts are permanent and cannot be restored. Gems cannot be refunded. If you still want to delete, type DELETE below.</string>
|
||||
<string name="reset_account_confirmation">Reset my Account</string>
|
||||
<string name="delete_account_confirmation">Delete my Account</string>
|
||||
<string name="danger_zone">Danger Zone</string>
|
||||
|
|
@ -1109,4 +1109,5 @@
|
|||
<string name="submit_feedback">Submit Feedback</string>
|
||||
<string name="user_is_blocked">You blocked this user</string>
|
||||
<string name="user_is_blocked_explanation">A blocked user cannot send you Private Messages but you will still see their posts in Tavern or Guilds.</string>
|
||||
<string name="finish">Finish</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@
|
|||
</style>
|
||||
|
||||
<!-- used activity_main.xml -->
|
||||
<style name="Toolbar" parent="Base.ThemeOverlay.AppCompat.ActionBar">
|
||||
<style name="Toolbar" parent="ThemeOverlay.AppCompat.DayNight.ActionBar">
|
||||
<item name="android:textColorPrimary">?attr/toolbarContentColor</item>
|
||||
<item name="textColorSecondary">?attr/toolbarContentColor</item>
|
||||
<item name="background">?attr/headerBackgroundColor</item>
|
||||
|
|
@ -328,12 +328,17 @@
|
|||
</style>
|
||||
|
||||
|
||||
<style name="Toolbar.Modern" parent="Base.ThemeOverlay.AppCompat.ActionBar">
|
||||
<style name="Toolbar.Modern" parent="ThemeOverlay.AppCompat.DayNight.ActionBar">
|
||||
<item name="android:textColorPrimary">?attr/headerTextColor</item>
|
||||
<item name="textColorSecondary">?attr/headerTextColor</item>
|
||||
<item name="background">?attr/headerBackgroundColor</item>
|
||||
<item name="actionMenuTextColor">?attr/toolbarContentColor</item>
|
||||
<item name="android:actionMenuTextColor">?attr/toolbarContentColor</item>
|
||||
<item name="android:itemTextAppearance">@style/menu_item_color</item>
|
||||
</style>
|
||||
|
||||
<style name="menu_item_color">
|
||||
<item name="android:textColor">@color/text_primary</item>
|
||||
</style>
|
||||
|
||||
<style name="HabitButton" parent="android:Widget.Button">
|
||||
|
|
@ -577,8 +582,11 @@
|
|||
<style name="DiamondButton" parent="@style/Widget.AppCompat.Button.Borderless">
|
||||
<item name="android:layout_height">36dp</item>
|
||||
<item name="android:background">@drawable/diamond_button</item>
|
||||
<item name="backgroundTint">@color/brand</item>
|
||||
<item name="android:paddingStart">36dp</item>
|
||||
<item name="android:paddingEnd">36dp</item>
|
||||
<item name="android:paddingTop">0dp</item>
|
||||
<item name="android:paddingBottom">0dp</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
<item name="android:shadowColor">@color/transparent</item>
|
||||
|
|
|
|||
|
|
@ -96,5 +96,9 @@
|
|||
<key>activePromo</key>
|
||||
<value> </value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>knownIssues</key>
|
||||
<value>[]</value>
|
||||
</entry>
|
||||
</defaultsMap>
|
||||
<!-- END xml_defaults -->
|
||||
|
|
@ -116,4 +116,9 @@ class AppConfigManager {
|
|||
}
|
||||
return null
|
||||
}
|
||||
|
||||
fun knownIssues(): List<Map<String, String>> {
|
||||
val type = object : TypeToken<List<Map<String, String>>>() {}.type
|
||||
return Gson().fromJson(remoteConfig.getString("knownIssues"), type)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import androidx.core.app.RemoteInput
|
|||
import androidx.core.os.bundleOf
|
||||
import com.habitrpg.android.habitica.R
|
||||
import com.habitrpg.android.habitica.receivers.LocalNotificationActionReceiver
|
||||
import net.pherth.android.emoji_library.EmojiParser
|
||||
import com.habitrpg.android.habitica.ui.helpers.EmojiParser
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import androidx.core.app.RemoteInput
|
|||
import androidx.core.os.bundleOf
|
||||
import com.habitrpg.android.habitica.R
|
||||
import com.habitrpg.android.habitica.receivers.LocalNotificationActionReceiver
|
||||
import net.pherth.android.emoji_library.EmojiParser
|
||||
import com.habitrpg.android.habitica.ui.helpers.EmojiParser
|
||||
|
||||
|
||||
class ReceivedPrivateMessageLocalNotification(context: Context, identifier: String) : HabiticaLocalNotification(context, identifier) {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import android.content.res.Configuration
|
|||
import android.content.res.Resources
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.Menu
|
||||
import android.view.View
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.app.AppCompatDelegate
|
||||
|
|
@ -38,6 +39,8 @@ abstract class BaseActivity : AppCompatActivity() {
|
|||
|
||||
open var overrideModernHeader: Boolean? = null
|
||||
|
||||
internal var toolbar: Toolbar? = null
|
||||
|
||||
protected abstract fun getLayoutResId(): Int
|
||||
|
||||
open fun getContentView(): View {
|
||||
|
|
@ -148,6 +151,7 @@ abstract class BaseActivity : AppCompatActivity() {
|
|||
protected abstract fun injectActivity(component: UserComponent?)
|
||||
|
||||
protected fun setupToolbar(toolbar: Toolbar?) {
|
||||
this.toolbar = toolbar
|
||||
if (toolbar != null) {
|
||||
setSupportActionBar(toolbar)
|
||||
|
||||
|
|
@ -163,6 +167,12 @@ abstract class BaseActivity : AppCompatActivity() {
|
|||
toolbar?.let { ToolbarColorHelper.colorizeToolbar(it, this, overrideModernHeader) }
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
val ret = super.onCreateOptionsMenu(menu)
|
||||
toolbar?.let { ToolbarColorHelper.colorizeToolbar(it, this, overrideModernHeader) }
|
||||
return ret
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
destroyed = true
|
||||
|
||||
|
|
|
|||
|
|
@ -110,11 +110,12 @@ class ChallengeFormActivity : BaseActivity() {
|
|||
component?.inject(this)
|
||||
}
|
||||
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
val inflater = menuInflater
|
||||
inflater.inflate(R.menu.menu_create_challenge, menu)
|
||||
findViewById<Toolbar>(R.id.toolbar).let { ToolbarColorHelper.colorizeToolbar(it, this, overrideModernHeader) }
|
||||
return true
|
||||
return super.onCreateOptionsMenu(menu)
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
|
|
|
|||
|
|
@ -65,9 +65,9 @@ class FixCharacterValuesActivity: BaseActivity() {
|
|||
binding.streakIconView.setImageResource(R.drawable.achievement_thermometer)
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
menuInflater.inflate(R.menu.menu_save, menu)
|
||||
return true
|
||||
return super.onCreateOptionsMenu(menu)
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import android.widget.ProgressBar
|
|||
import android.widget.TableLayout
|
||||
import android.widget.TableRow
|
||||
import android.widget.TextView
|
||||
import androidx.appcompat.widget.AppCompatEditText
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.os.bundleOf
|
||||
|
|
@ -44,7 +45,6 @@ import com.habitrpg.android.habitica.ui.views.HabiticaSnackbar.SnackbarDisplayTy
|
|||
import com.habitrpg.android.habitica.ui.views.dialogs.HabiticaAlertDialog
|
||||
import io.reactivex.Flowable
|
||||
import io.realm.RealmResults
|
||||
import net.pherth.android.emoji_library.EmojiEditText
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import javax.inject.Inject
|
||||
|
|
@ -113,16 +113,15 @@ class FullProfileActivity : BaseActivity() {
|
|||
super.onDestroy()
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
val inflater = menuInflater
|
||||
inflater.inflate(R.menu.menu_full_profile, menu)
|
||||
val item = menu?.findItem(R.id.block_user)
|
||||
val item = menu.findItem(R.id.block_user)
|
||||
if (isUserBlocked()) {
|
||||
item?.title = getString(R.string.unblock_user)
|
||||
} else {
|
||||
item?.title = getString(R.string.block)
|
||||
}
|
||||
findViewById<Toolbar>(R.id.toolbar).let { ToolbarColorHelper.colorizeToolbar(it, this, overrideModernHeader) }
|
||||
return super.onCreateOptionsMenu(menu)
|
||||
}
|
||||
|
||||
|
|
@ -187,7 +186,7 @@ class FullProfileActivity : BaseActivity() {
|
|||
val factory = LayoutInflater.from(this)
|
||||
val newMessageView = factory.inflate(R.layout.profile_new_message_dialog, null)
|
||||
|
||||
val emojiEditText = newMessageView.findViewById<EmojiEditText>(R.id.edit_new_message_text)
|
||||
val emojiEditText = newMessageView.findViewById<AppCompatEditText>(R.id.edit_new_message_text)
|
||||
|
||||
val newMessageTitle = newMessageView.findViewById<TextView>(R.id.new_message_title)
|
||||
newMessageTitle.text = String.format(getString(R.string.profile_send_message_to), userDisplayName)
|
||||
|
|
@ -360,7 +359,6 @@ class FullProfileActivity : BaseActivity() {
|
|||
|
||||
private fun addLevelAttributes(user: Member) {
|
||||
val byLevelStat = min((user.stats?.lvl ?: 0) / 2.0f, 50f)
|
||||
|
||||
addAttributeRow(getString(R.string.profile_level), byLevelStat, byLevelStat, byLevelStat, byLevelStat, true, false)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class GroupInviteActivity : BaseActivity() {
|
|||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
menuInflater.inflate(R.menu.menu_party_invite, menu)
|
||||
return true
|
||||
return super.onCreateOptionsMenu(menu)
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ import io.reactivex.Observable
|
|||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.functions.Consumer
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
import io.realm.kotlin.isValid
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
import java.util.*
|
||||
|
|
@ -275,6 +276,7 @@ open class MainActivity : BaseActivity(), TutorialView.OnTutorialReaction {
|
|||
}
|
||||
if (destination.id == R.id.petDetailRecyclerFragment || destination.id == R.id.mountDetailRecyclerFragment) {
|
||||
compositeSubscription.add(inventoryRepository.getItem("egg", arguments?.getString("type") ?: "").firstElement().subscribe({
|
||||
if (!it.isValid()) return@subscribe
|
||||
binding.toolbarTitle.text = if (destination.id == R.id.petDetailRecyclerFragment) {
|
||||
(it as? Egg)?.text
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ class SetupActivity : BaseActivity(), ViewPager.OnPageChangeListener {
|
|||
}
|
||||
isLastPage -> {
|
||||
this.setPreviousButtonEnabled(true)
|
||||
binding.nextButton.text = this.getString(R.string.intro_finish_button)
|
||||
binding.nextButton.text = this.getString(R.string.finish)
|
||||
}
|
||||
else -> {
|
||||
this.setPreviousButtonEnabled(true)
|
||||
|
|
|
|||
|
|
@ -257,6 +257,10 @@ class TaskFormActivity : BaseActivity() {
|
|||
binding.habitResetStreakTitleView.visibility = habitViewsVisibility
|
||||
binding.habitResetStreakButtons.visibility = habitViewsVisibility
|
||||
binding.habitAdjustNegativeStreakView.visibility = habitViewsVisibility
|
||||
if (taskType == Task.TYPE_HABIT) {
|
||||
binding.habitScoringButtons.isPositive = true
|
||||
binding.habitScoringButtons.isNegative = false
|
||||
}
|
||||
|
||||
val habitDailyVisibility = if (taskType == Task.TYPE_DAILY || taskType == Task.TYPE_HABIT) View.VISIBLE else View.GONE
|
||||
binding.adjustStreakTitleView.visibility = habitDailyVisibility
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import io.reactivex.Flowable
|
|||
import io.reactivex.subjects.PublishSubject
|
||||
import io.realm.OrderedRealmCollection
|
||||
import io.realm.RealmRecyclerViewAdapter
|
||||
import net.pherth.android.emoji_library.EmojiParser
|
||||
import com.habitrpg.android.habitica.ui.helpers.EmojiParser
|
||||
|
||||
class ChallengesListViewAdapter(data: OrderedRealmCollection<Challenge>?, autoUpdate: Boolean, private val viewUserChallengesOnly: Boolean, private val userId: String) : RealmRecyclerViewAdapter<Challenge, ChallengesListViewAdapter.ChallengeViewHolder>(data, autoUpdate) {
|
||||
private var unfilteredData: OrderedRealmCollection<Challenge>? = null
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ package com.habitrpg.android.habitica.ui.fragments
|
|||
import android.content.Context
|
||||
import android.graphics.PorterDuff
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.*
|
||||
import androidx.viewbinding.ViewBinding
|
||||
import com.google.android.material.appbar.AppBarLayout
|
||||
import com.google.android.material.tabs.TabLayout
|
||||
|
|
@ -18,6 +15,7 @@ import com.habitrpg.android.habitica.helpers.RxErrorHandler
|
|||
import com.habitrpg.android.habitica.helpers.SoundManager
|
||||
import com.habitrpg.android.habitica.models.user.User
|
||||
import com.habitrpg.android.habitica.ui.activities.MainActivity
|
||||
import com.habitrpg.android.habitica.ui.helpers.ToolbarColorHelper
|
||||
import javax.inject.Inject
|
||||
|
||||
abstract class BaseMainFragment<VB: ViewBinding> : BaseFragment<VB>() {
|
||||
|
|
@ -85,6 +83,11 @@ abstract class BaseMainFragment<VB: ViewBinding> : BaseFragment<VB>() {
|
|||
activity?.supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||
super.onCreateOptionsMenu(menu, inflater)
|
||||
activity?.toolbar?.let { ToolbarColorHelper.colorizeToolbar(it, activity, null) }
|
||||
}
|
||||
|
||||
private fun updateTabLayoutVisibility() {
|
||||
if (this.usesTabLayout) {
|
||||
tabLayout?.removeAllTabs()
|
||||
|
|
|
|||
|
|
@ -162,6 +162,7 @@ class AvatarCustomizationFragment : BaseMainFragment<FragmentRecyclerviewBinding
|
|||
"skin" -> prefs?.skin
|
||||
"shirt" -> prefs?.shirt
|
||||
"background" -> prefs?.background
|
||||
"chair" -> prefs?.chair
|
||||
"hair" -> when (this.category) {
|
||||
"bangs" -> prefs?.hair?.bangs.toString()
|
||||
"base" -> prefs?.hair?.base.toString()
|
||||
|
|
|
|||
|
|
@ -34,9 +34,6 @@ class EquipmentDetailFragment : BaseMainFragment<FragmentRecyclerviewBinding>()
|
|||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?): View? {
|
||||
this.adapter.equippedGear = this.equippedGear
|
||||
this.adapter.isCostume = this.isCostume
|
||||
this.adapter.type = this.type
|
||||
compositeSubscription.add(this.adapter.equipEvents.flatMapMaybe { key -> inventoryRepository.equipGear(user, key, isCostume ?: false).firstElement() }
|
||||
.subscribe({ }, RxErrorHandler.handleEmptyError()))
|
||||
return super.onCreateView(inflater, container, savedInstanceState)
|
||||
|
|
@ -53,6 +50,10 @@ class EquipmentDetailFragment : BaseMainFragment<FragmentRecyclerviewBinding>()
|
|||
equippedGear = args.equippedGear
|
||||
}
|
||||
|
||||
this.adapter.equippedGear = this.equippedGear
|
||||
this.adapter.isCostume = this.isCostume
|
||||
this.adapter.type = this.type
|
||||
|
||||
binding?.recyclerView?.adapter = this.adapter
|
||||
binding?.recyclerView?.layoutManager = LinearLayoutManager(activity)
|
||||
binding?.recyclerView?.addItemDecoration(DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL))
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import android.content.Context
|
|||
import android.os.Bundle
|
||||
import android.text.InputType
|
||||
import android.widget.EditText
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.Toast
|
||||
import androidx.core.os.bundleOf
|
||||
import androidx.preference.Preference
|
||||
|
|
@ -185,12 +186,13 @@ class AuthenticationPreferenceFragment: BasePreferencesFragment() {
|
|||
val dialog = HabiticaAlertDialog(context)
|
||||
dialog.setTitle(R.string.delete_account)
|
||||
dialog.setMessage(deleteMessage)
|
||||
dialog.addButton(R.string.delete_account_confirmation, isPrimary = true, isDestructive = true) { _, _ ->
|
||||
dialog.addCancelButton()
|
||||
dialog.addButton(R.string.delete, isPrimary = true, isDestructive = true) { _, _ ->
|
||||
deleteAccount(editText?.text?.toString() ?: "")
|
||||
}
|
||||
dialog.addCancelButton()
|
||||
dialog.setAdditionalContentView(view)
|
||||
dialog.setAdditionalContentSidePadding(12.dpToPx(context))
|
||||
dialog.buttonAxis = LinearLayout.HORIZONTAL
|
||||
dialog.show()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,8 +56,8 @@ class AvatarSetupFragment : BaseFragment<FragmentSetupAvatarBinding>() {
|
|||
|
||||
this.adapter = CustomizationSetupAdapter()
|
||||
this.adapter?.userSize = this.user?.preferences?.size ?: "slim"
|
||||
adapter?.updateUserEvents?.flatMap { userRepository.updateUser(user, it) }?.subscribeWithErrorHandler({})?.let { compositeSubscription.add(it) }
|
||||
adapter?.equipGearEvents?.flatMap { inventoryRepository.equip(user, "equipped", it) }?.subscribeWithErrorHandler({})?.let { compositeSubscription.add(it) }
|
||||
adapter?.updateUserEvents?.flatMap { userRepository.updateUser(user, it) }?.subscribeWithErrorHandler {}?.let { compositeSubscription.add(it) }
|
||||
adapter?.equipGearEvents?.flatMap { inventoryRepository.equip(user, "equipped", it) }?.subscribeWithErrorHandler {}?.let { compositeSubscription.add(it) }
|
||||
|
||||
this.adapter?.user = this.user
|
||||
val layoutManager = LinearLayoutManager(activity)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import com.habitrpg.android.habitica.ui.fragments.BaseMainFragment
|
|||
import com.habitrpg.android.habitica.ui.helpers.setMarkdown
|
||||
import com.habitrpg.android.habitica.ui.views.HabiticaIconsHelper
|
||||
import com.habitrpg.android.habitica.ui.views.dialogs.HabiticaAlertDialog
|
||||
import net.pherth.android.emoji_library.EmojiParser
|
||||
import com.habitrpg.android.habitica.ui.helpers.EmojiParser
|
||||
import java.util.*
|
||||
import javax.inject.Inject
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import android.view.View
|
|||
import android.view.ViewGroup
|
||||
import android.widget.Button
|
||||
import android.widget.TextView
|
||||
import androidx.appcompat.widget.AppCompatEditText
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.os.bundleOf
|
||||
import com.habitrpg.android.habitica.R
|
||||
|
|
@ -39,7 +40,6 @@ import kotlinx.coroutines.Dispatchers
|
|||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import net.pherth.android.emoji_library.EmojiEditText
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Named
|
||||
|
||||
|
|
@ -267,7 +267,7 @@ class PartyDetailFragment : BaseFragment<FragmentPartyDetailBinding>() {
|
|||
val factory = LayoutInflater.from(context)
|
||||
val newMessageView = factory.inflate(R.layout.profile_new_message_dialog, null)
|
||||
|
||||
val emojiEditText = newMessageView.findViewById<EmojiEditText>(R.id.edit_new_message_text)
|
||||
val emojiEditText = newMessageView.findViewById<AppCompatEditText>(R.id.edit_new_message_text)
|
||||
|
||||
val newMessageTitle = newMessageView.findViewById<TextView>(R.id.new_message_title)
|
||||
newMessageTitle.text = String.format(getString(R.string.profile_send_message_to), username)
|
||||
|
|
|
|||
|
|
@ -8,12 +8,17 @@ import android.os.Bundle
|
|||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.core.os.bundleOf
|
||||
import com.habitrpg.android.habitica.R
|
||||
import com.habitrpg.android.habitica.components.UserComponent
|
||||
import com.habitrpg.android.habitica.databinding.FragmentSupportBugFixBinding
|
||||
import com.habitrpg.android.habitica.databinding.KnownIssueBinding
|
||||
import com.habitrpg.android.habitica.extensions.layoutInflater
|
||||
import com.habitrpg.android.habitica.helpers.AppConfigManager
|
||||
import com.habitrpg.android.habitica.helpers.AppTestingLevel
|
||||
import com.habitrpg.android.habitica.helpers.DeviceName
|
||||
import com.habitrpg.android.habitica.helpers.MainNavigationController
|
||||
import com.habitrpg.android.habitica.modules.AppModule
|
||||
import com.habitrpg.android.habitica.ui.fragments.BaseMainFragment
|
||||
import io.reactivex.Completable
|
||||
|
|
@ -53,6 +58,15 @@ class BugFixFragment: BaseMainFragment<FragmentSupportBugFixBinding>() {
|
|||
binding?.reportBugButton?.setOnClickListener {
|
||||
sendEmail("[Android] Bugreport")
|
||||
}
|
||||
|
||||
appConfigManager.knownIssues().forEach { issue ->
|
||||
val issueBinding = KnownIssueBinding.inflate(view.context.layoutInflater)
|
||||
issueBinding.root.text = issue["title"]
|
||||
issueBinding.root.setOnClickListener {
|
||||
MainNavigationController.navigate(R.id.FAQDetailFragment, bundleOf(Pair("question", issue["title"]), Pair("answer", issue["text"])))
|
||||
}
|
||||
binding?.knownIssuesLayout?.addView(issueBinding.root)
|
||||
}
|
||||
}
|
||||
|
||||
private val versionName: String by lazy {
|
||||
|
|
|
|||
|
|
@ -33,10 +33,16 @@ class FAQDetailFragment : BaseMainFragment<FragmentFaqDetailBinding>() {
|
|||
|
||||
arguments?.let {
|
||||
val args = FAQDetailFragmentArgs.fromBundle(it)
|
||||
compositeSubscription.add(faqRepository.getArticle(args.position).subscribe({ faq ->
|
||||
binding?.questionTextView?.text = faq.question
|
||||
binding?.answerTextView?.text = MarkdownParser.parseMarkdown(faq.answer)
|
||||
}, RxErrorHandler.handleEmptyError()))
|
||||
if (args.question != null) {
|
||||
binding?.questionTextView?.text = args.question
|
||||
binding?.answerTextView?.text = MarkdownParser.parseMarkdown(args.answer)
|
||||
} else {
|
||||
compositeSubscription.add(faqRepository.getArticle(args.position).subscribe({ faq ->
|
||||
binding?.questionTextView?.text = faq.question
|
||||
binding?.answerTextView?.text = MarkdownParser.parseMarkdown(faq.answer)
|
||||
}, RxErrorHandler.handleEmptyError()))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
binding?.answerTextView?.movementMethod = LinkMovementMethod.getInstance()
|
||||
|
|
|
|||
|
|
@ -72,7 +72,9 @@ class FAQOverviewFragment : BaseMainFragment<FragmentFaqOverviewBinding>() {
|
|||
val binding = SupportFaqItemBinding.inflate(context.layoutInflater, binding?.faqLinearLayout, true)
|
||||
binding.textView.text = article.question
|
||||
binding.root.setOnClickListener {
|
||||
MainNavigationController.navigate(FAQOverviewFragmentDirections.openFAQDetail(article.position ?: 0))
|
||||
val direction = FAQOverviewFragmentDirections.openFAQDetail(null, null)
|
||||
direction.position = article.position ?: 0
|
||||
MainNavigationController.navigate(direction)
|
||||
}
|
||||
}
|
||||
}, RxErrorHandler.handleEmptyError()))
|
||||
|
|
|
|||
|
|
@ -366,6 +366,12 @@ class TasksFragment : BaseMainFragment<FragmentViewpagerBinding>(), SearchView.O
|
|||
val taskType = data?.getStringExtra(TaskFormActivity.TASK_TYPE_KEY)
|
||||
if (taskType != null) {
|
||||
switchToTaskTab(taskType)
|
||||
|
||||
val index = indexForTaskType(taskType)
|
||||
if (index != -1) {
|
||||
val fragment = viewFragmentsDictionary?.get(index)
|
||||
fragment?.binding?.recyclerView?.scrollToPosition(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ import com.habitrpg.android.habitica.models.user.Authentication
|
|||
import com.habitrpg.android.habitica.models.user.Profile
|
||||
import com.habitrpg.android.habitica.ui.views.HabiticaEmojiTextView
|
||||
import com.habitrpg.android.habitica.ui.views.social.UsernameLabel
|
||||
import net.pherth.android.emoji_library.EmojiMap
|
||||
import net.pherth.android.emoji_library.EmojiParser
|
||||
import com.habitrpg.android.habitica.ui.helpers.EmojiMap
|
||||
import com.habitrpg.android.habitica.ui.helpers.EmojiParser
|
||||
import java.util.*
|
||||
|
||||
class AutocompleteAdapter(val context: Context, val socialRepository: SocialRepository? = null, var autocompleteContext: String? = null, var groupID: String? = null, val remoteAutocomplete: Boolean = false) : BaseAdapter(), Filterable {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,50 @@
|
|||
package com.habitrpg.android.habitica.ui.helpers
|
||||
|
||||
import java.util.regex.Pattern
|
||||
|
||||
object EmojiParser {
|
||||
/**
|
||||
* Converts Cheat Sheet emoji-codes into unicode characters
|
||||
*
|
||||
* @param text String containing Cheat Sheet codes
|
||||
* @return Formatted String containing unicode characters
|
||||
*/
|
||||
fun parseEmojis(text: String?): String? {
|
||||
if (text == null) {
|
||||
return text
|
||||
}
|
||||
var returnString: String = text
|
||||
val pattern = Pattern.compile("(:[^:]+:)")
|
||||
val matcher = pattern.matcher(text)
|
||||
while (matcher.find()) {
|
||||
val found = matcher.group()
|
||||
if (EmojiMap.invertedEmojiMap[found] == null) continue
|
||||
val hexInt = EmojiMap.invertedEmojiMap[found]!!
|
||||
val replacement = String(Character.toChars(hexInt))
|
||||
returnString = returnString.replace(found, replacement)
|
||||
}
|
||||
return returnString
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts unicode characters into Cheat Sheet codes
|
||||
*
|
||||
* @param text String containing unicode formatted emojis
|
||||
* @return String containing the Cheat Sheet codes of the emojis
|
||||
*/
|
||||
fun convertToCheatCode(text: String?): String? {
|
||||
if (text == null) {
|
||||
return text
|
||||
}
|
||||
var returnString: String = text
|
||||
val charArray = text.toCharArray()
|
||||
for (i in 0..charArray.size - 2) {
|
||||
val testString = String(charArray.copyOfRange(i, i + 2))
|
||||
val test = testString.codePointAt(0)
|
||||
if (EmojiMap.emojiMap.containsKey(test)) {
|
||||
returnString = returnString.replace(testString, EmojiMap.emojiMap[test]!!)
|
||||
}
|
||||
}
|
||||
return returnString
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,6 @@ import io.reactivex.Single
|
|||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.functions.Consumer
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
import net.pherth.android.emoji_library.EmojiParser
|
||||
|
||||
|
||||
object MarkdownParser {
|
||||
|
|
|
|||
|
|
@ -69,11 +69,10 @@ object ToolbarColorHelper {
|
|||
if (innerView is ActionMenuItemView) {
|
||||
innerView.setTextColor(toolbarIconsColor)
|
||||
for (k in innerView.compoundDrawables.indices) {
|
||||
if (innerView.compoundDrawables[k] != null) {
|
||||
|
||||
//Important to set the color filter in seperate thread, by adding it to the message queue
|
||||
//Won't work otherwise.
|
||||
innerView.post { innerView.compoundDrawables[k].colorFilter = colorFilter }
|
||||
innerView.post {
|
||||
if (innerView.compoundDrawables[k] != null) {
|
||||
innerView.compoundDrawables[k].colorFilter = colorFilter
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,10 +66,6 @@ class HabitScoringButtonsView @JvmOverloads constructor(
|
|||
isNegative = !isNegative
|
||||
sendAccessibilityEvent(AccessibilityEvent.CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
|
||||
isPositive = true
|
||||
isNegative = true
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ class YesterdailyDialog private constructor(context: Context, private val userRe
|
|||
taskRepository.scoreChecklistItem(task.id ?: "", item.id ?: "").subscribe({ }, RxErrorHandler.handleEmptyError())
|
||||
configureChecklistView(checklistView, task, item)
|
||||
}
|
||||
checkboxHolder?.setBackgroundResource(R.color.window_background)
|
||||
checkboxHolder?.setBackgroundResource(task.extraLightTaskColor)
|
||||
val textView = checklistView.findViewById(R.id.checkedTextView) as? TextView
|
||||
textView?.text = item.text
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import com.habitrpg.android.habitica.helpers.RxErrorHandler
|
|||
import com.habitrpg.android.habitica.models.responses.TaskDirection
|
||||
import com.habitrpg.android.habitica.models.tasks.Task
|
||||
import com.habitrpg.android.habitica.ui.helpers.MarkdownParser
|
||||
import net.pherth.android.emoji_library.EmojiHandler
|
||||
import java.util.*
|
||||
import javax.inject.Inject
|
||||
|
||||
|
|
@ -58,7 +57,6 @@ class HabitButtonWidgetService : Service() {
|
|||
val parsedText = MarkdownParser.parseMarkdown(task.text)
|
||||
|
||||
val builder = SpannableStringBuilder(parsedText)
|
||||
EmojiHandler.addEmojis(this.context, builder, 16, DynamicDrawableSpan.ALIGN_BASELINE, 16, 0, -1, false)
|
||||
|
||||
remoteViews.setTextViewText(R.id.habit_title, builder)
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ import com.habitrpg.android.habitica.models.tasks.Task
|
|||
import com.habitrpg.android.habitica.ui.helpers.MarkdownParser
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import net.pherth.android.emoji_library.EmojiHandler
|
||||
import java.util.*
|
||||
import javax.inject.Inject
|
||||
|
||||
|
|
@ -83,7 +82,6 @@ abstract class TaskListFactory internal constructor(val context: Context, intent
|
|||
val parsedText = MarkdownParser.parseMarkdown(task.text)
|
||||
|
||||
val builder = SpannableStringBuilder(parsedText)
|
||||
EmojiHandler.addEmojis(this.context, builder, 16, DynamicDrawableSpan.ALIGN_BASELINE, 16, 0, -1, false)
|
||||
|
||||
remoteView.setTextViewText(listItemTextResId, builder)
|
||||
remoteView.setInt(R.id.checkbox_background, "setBackgroundResource", task.lightTaskColor)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"properties": [],
|
||||
"versionCode": 2557,
|
||||
"versionCode": 2560,
|
||||
"versionName": "3.0",
|
||||
"enabled": true,
|
||||
"outputFile": "Habitica-staff-release.apk"
|
||||
|
|
|
|||
Loading…
Reference in a new issue