Skip to content

Commit

Permalink
Merge branch 'release/1.2.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
mouredev committed Nov 12, 2021
2 parents 8cb8609 + 841e135 commit da59347
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 8 deletions.
10 changes: 10 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ android {
applicationId "com.mouredev.twitimer"
minSdkVersion 23
targetSdkVersion 30
versionCode 14
versionName "1.2.2"
versionCode 15
versionName "1.2.3"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.mouredev.twitimer.model.session.Session
import com.mouredev.twitimer.provider.services.twitch.TwitchService
import com.mouredev.twitimer.util.Constants
import java.net.URL

class AccountViewModel : ViewModel() {
Expand Down Expand Up @@ -36,7 +37,7 @@ class AccountViewModel : ViewModel() {

fun selected(context: Context, uri: Uri, listener: AccountFragmentListener?) {

if (uri.host?.contains("localhost") == true) {
if (uri.host?.contains(Constants.TWITCH_REDIRECT_HOST) == true) {
val authorizationCode = uri.getQueryParameter("code")
authorizationCode?.let { authCode ->
loading.postValue(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.app.DatePickerDialog
import android.app.TimePickerDialog
import android.content.Context
import android.text.Editable
import android.text.InputType
import android.text.TextWatcher
import android.view.LayoutInflater
import android.view.View
Expand Down Expand Up @@ -52,7 +53,7 @@ class ScheduleRecyclerViewAdapter(val context: Context, var schedules: MutableLi

if (weekday == WeekdayType.CUSTOM) {
binding.imageViewClockIcon.visibility = View.GONE
binding.buttonDate.picker(ContextCompat.getColor(context, if (readOnly) R.color.light else R.color.primary))
binding.buttonDate.picker(ContextCompat.getColor(context, R.color.light))
binding.textViewWeekday.visibility = View.GONE
binding.imageViewCustom.visibility = View.VISIBLE

Expand Down Expand Up @@ -249,6 +250,8 @@ class ScheduleRecyclerViewAdapter(val context: Context, var schedules: MutableLi
binding.editTextInfo.setBackgroundColor(ContextCompat.getColor(context, R.color.secondary))
binding.editTextInfo.setTextColor(ContextCompat.getColor(context, R.color.light))
binding.editTextInfo.isEnabled = false
binding.editTextInfo.layoutParams.height = ViewGroup.LayoutParams.WRAP_CONTENT
binding.editTextInfo.isSingleLine = false
}

return viewHolder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ class UserHeaderFragment : Fragment() {
if (settings.tiktok?.isNotBlank() == true) {
binding.imageButtonTikTok.visibility = View.VISIBLE
binding.imageButtonTikTok.setOnClickListener {
Util.openBrowser(context, "${Constants.TIKTOK_URI}${settings.tiktok?.removeSocialInvalidCharacters()}")
// Pasamos el user a minus ya que la App de TikTok es case sensitive
Util.openBrowser(context, "${Constants.TIKTOK_URI}${settings.tiktok?.lowercase()?.removeSocialInvalidCharacters()}")
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/com/mouredev/twitimer/util/Constants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ object Constants {
const val TWITCH_AUTH_URI = "https://id.twitch.tv/oauth2/"
const val TWITCH_API_URI = "https://api.twitch.tv/helix/"
const val TWITCH_PROFILE_URI = "https://www.twitch.tv/"
const val TWITCH_REDIRECT_URI = "http://localhost"
const val TWITCH_REDIRECT_URI = "https://twitimer.com"
const val TWITCH_REDIRECT_HOST = "twitimer.com"

// Remote
const val REMOTE_TWITCH_CLIENT_ID = "TwitchClientID"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackgroundBorderless"
android:drawableEnd="@drawable/next"
android:drawableTint="@color/secondary"
android:drawableTint="@color/primary"
android:letterSpacing="0"
android:paddingLeft="0dp"
android:paddingRight="0dp"
Expand All @@ -215,7 +215,7 @@
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackgroundBorderless"
android:drawableEnd="@drawable/next"
android:drawableTint="@color/secondary"
android:drawableTint="@color/primary"
android:letterSpacing="0"
android:paddingLeft="0dp"
android:paddingRight="0dp"
Expand Down

0 comments on commit da59347

Please sign in to comment.