Unverified Commit dc34103c authored by Filipe de Lima Brito's avatar Filipe de Lima Brito Committed by GitHub

Merge branch 'beta' into patch-8

parents c6c8b58e fee0d456
...@@ -6,6 +6,7 @@ if (isPlay) { apply plugin: 'io.fabric' } ...@@ -6,6 +6,7 @@ if (isPlay) { apply plugin: 'io.fabric' }
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-kapt'
apply plugin: "com.github.ben-manes.versions"
android { android {
compileSdkVersion versions.compileSdk compileSdkVersion versions.compileSdk
...@@ -15,8 +16,8 @@ android { ...@@ -15,8 +16,8 @@ android {
applicationId "chat.rocket.android" applicationId "chat.rocket.android"
minSdkVersion versions.minSdk minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk targetSdkVersion versions.targetSdk
versionCode 2036 versionCode 2038
versionName "2.5.1" versionName "2.6.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true multiDexEnabled true
...@@ -145,14 +146,14 @@ dependencies { ...@@ -145,14 +146,14 @@ dependencies {
implementation libraries.aVLoadingIndicatorView implementation libraries.aVLoadingIndicatorView
implementation "com.github.luciofm:livedata-ktx:b1e8bbc25a" implementation libraries.livedataKtx
// Proprietary libraries // Proprietary libraries
playImplementation libraries.fcm playImplementation libraries.fcm
playImplementation libraries.firebaseAnalytics playImplementation libraries.firebaseAnalytics
playImplementation libraries.playServicesAuth playImplementation libraries.playServicesAuth
playImplementation('com.crashlytics.sdk.android:crashlytics:2.9.4@aar') { transitive = true } playImplementation('com.crashlytics.sdk.android:crashlytics:2.9.5@aar') { transitive = true }
playImplementation('com.crashlytics.sdk.android:answers:1.4.2@aar') { transitive = true } playImplementation('com.crashlytics.sdk.android:answers:1.4.3@aar') { transitive = true }
testImplementation libraries.junit testImplementation libraries.junit
testImplementation libraries.truth testImplementation libraries.truth
......
...@@ -454,6 +454,7 @@ class LoginPresenter @Inject constructor( ...@@ -454,6 +454,7 @@ class LoginPresenter @Inject constructor(
) )
localRepository.saveCurrentUser(currentServer, user) localRepository.saveCurrentUser(currentServer, user)
saveCurrentServer.save(currentServer) saveCurrentServer.save(currentServer)
localRepository.save(LocalRepository.CURRENT_USERNAME_KEY, myself.username)
saveAccount(myself.username!!) saveAccount(myself.username!!)
saveToken(token) saveToken(token)
registerPushToken() registerPushToken()
......
...@@ -75,6 +75,7 @@ class TwoFAPresenter @Inject constructor( ...@@ -75,6 +75,7 @@ class TwoFAPresenter @Inject constructor(
saveAccount(me) saveAccount(me)
saveCurrentServerInteractor.save(currentServer) saveCurrentServerInteractor.save(currentServer)
tokenRepository.save(server, token) tokenRepository.save(server, token)
localRepository.save(LocalRepository.CURRENT_USERNAME_KEY, me.username)
registerPushToken() registerPushToken()
analyticsManager.logLogin( analyticsManager.logLogin(
AuthenticationEvent.AuthenticationWithUserAndPassword, AuthenticationEvent.AuthenticationWithUserAndPassword,
......
...@@ -17,15 +17,15 @@ import chat.rocket.common.util.ifNull ...@@ -17,15 +17,15 @@ import chat.rocket.common.util.ifNull
import chat.rocket.core.internal.realtime.socket.model.State import chat.rocket.core.internal.realtime.socket.model.State
import chat.rocket.core.internal.rest.spotlight import chat.rocket.core.internal.rest.spotlight
import chat.rocket.core.model.SpotlightResult import chat.rocket.core.model.SpotlightResult
import com.shopify.livedataktx.distinct
import com.shopify.livedataktx.map
import com.shopify.livedataktx.nonNull
import kotlinx.coroutines.experimental.android.UI import kotlinx.coroutines.experimental.android.UI
import kotlinx.coroutines.experimental.delay import kotlinx.coroutines.experimental.delay
import kotlinx.coroutines.experimental.isActive import kotlinx.coroutines.experimental.isActive
import kotlinx.coroutines.experimental.launch import kotlinx.coroutines.experimental.launch
import kotlinx.coroutines.experimental.newSingleThreadContext import kotlinx.coroutines.experimental.newSingleThreadContext
import kotlinx.coroutines.experimental.withContext import kotlinx.coroutines.experimental.withContext
import me.henrytao.livedataktx.distinct
import me.henrytao.livedataktx.map
import me.henrytao.livedataktx.nonNull
import timber.log.Timber import timber.log.Timber
import java.security.InvalidParameterException import java.security.InvalidParameterException
import kotlin.coroutines.experimental.coroutineContext import kotlin.coroutines.experimental.coroutineContext
......
...@@ -31,7 +31,7 @@ class SettingsFragment : Fragment(), SettingsView, AdapterView.OnItemClickListen ...@@ -31,7 +31,7 @@ class SettingsFragment : Fragment(), SettingsView, AdapterView.OnItemClickListen
@Inject @Inject
lateinit var analyticsManager: AnalyticsManager lateinit var analyticsManager: AnalyticsManager
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
AndroidSupportInjection.inject(this) AndroidSupportInjection.inject(this)
} }
......
...@@ -4,11 +4,8 @@ import androidx.lifecycle.LiveData ...@@ -4,11 +4,8 @@ import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Observer import androidx.lifecycle.Observer
import kotlinx.coroutines.experimental.CommonPool import kotlinx.coroutines.experimental.CommonPool
import kotlinx.coroutines.experimental.CoroutineScope
import kotlinx.coroutines.experimental.Job import kotlinx.coroutines.experimental.Job
import kotlinx.coroutines.experimental.android.UI
import kotlinx.coroutines.experimental.launch import kotlinx.coroutines.experimental.launch
import kotlinx.coroutines.experimental.withContext
import kotlin.coroutines.experimental.CoroutineContext import kotlin.coroutines.experimental.CoroutineContext
class WrappedLiveData<Source, Output>( class WrappedLiveData<Source, Output>(
......
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp" android:width="108dp"
android:height="108dp" android:height="108dp"
android:viewportHeight="1055.0303" android:viewportWidth="1055.0303"
android:viewportWidth="1055.0303"> android:viewportHeight="1055.0303">
<path
<group android:fillType="nonZero"
android:translateX="281.28394" android:pathData="M398.607,219.474L398.612,219.482C398.611,219.48 398.61,219.479 398.609,219.478C398.608,219.477 398.608,219.475 398.607,219.474ZM182.24,104.988C193.825,111.43 204.777,119.58 214.13,128.64C229.206,125.906 244.752,124.527 260.522,124.527C307.733,124.527 352.493,136.926 386.549,159.432C404.185,171.093 418.203,184.928 428.208,200.558C439.352,217.973 445,236.701 445,256.769C445,276.297 439.352,295.032 428.208,312.444C418.203,328.081 404.185,341.913 386.549,353.573C352.493,376.08 307.737,388.47 260.522,388.47C244.752,388.47 229.21,387.092 214.13,384.362C204.773,393.417 193.825,401.572 182.24,408.014C120.335,439.051 69,408.744 69,408.744C69,408.744 116.729,368.178 108.967,332.617C87.612,310.704 76.041,284.276 76.041,256.237C76.041,228.725 87.616,202.297 108.967,180.381C116.727,144.83 69.016,104.271 69,104.258C69.015,104.249 120.345,73.951 182.24,104.988Z"
android:translateY="271.51514"> android:strokeWidth="1"
<path android:strokeColor="#00000000">
android:fillColor="#CC3333" <aapt:attr name="android:fillColor">
android:pathData="M491.3,255.3c0,-24.1 -7.2,-47.2 -21.4,-68.7c-12.8,-19.3 -30.7,-36.4 -53.2,-50.7c-43.5,-27.8 -100.6,-43.1 -160.9,-43.1c-20.1,0 -40,1.7 -59.2,5.1c-11.9,-11.2 -25.9,-21.2 -40.7,-29.2c-79,-38.3 -144.6,-0.9 -144.6,-0.9s60.9,50.1 51,93.9c-27.3,27 -42,59.6 -42,93.6c0,0.1 0,0.2 0,0.3c0,0.1 0,0.2 0,0.3c0,33.9 14.8,66.6 42,93.6c9.9,43.9 -51,93.9 -51,93.9s65.5,37.4 144.6,-0.9c14.8,-8 28.8,-18 40.7,-29.2c19.2,3.4 39.1,5.1 59.2,5.1c60.3,0 117.4,-15.3 160.9,-43.1c22.5,-14.4 40.4,-31.5 53.2,-50.7c14.2,-21.5 21.4,-44.6 21.4,-68.7c0,-0.1 0,-0.2 0,-0.3C491.3,255.6 491.3,255.4 491.3,255.3z" /> <gradient
<path android:endX="257"
android:fillColor="#FFFFFF" android:endY="383.12793"
android:pathData="M255.9,124.2c113.9,0 206.3,59 206.3,131.8c0,72.8 -92.4,131.8 -206.3,131.8c-25.4,0 -49.7,-2.9 -72.1,-8.3c-22.8,27.4 -73,65.6 -121.7,53.3c15.9,-17 39.4,-45.8 34.3,-93.2c-29.2,-22.7 -46.8,-51.8 -46.8,-83.5C49.6,183.2 142,124.2 255.9,124.2" /> android:startX="257"
<path android:startY="49.942783"
android:fillColor="#CC3333" android:type="linear">
android:pathData="M255.9,256m-27.4,0a27.4,27.4 0,1 1,54.8 0a27.4,27.4 0,1 1,-54.8 0" /> <item
<path android:color="#FFDB2323"
android:fillColor="#CC3333" android:offset="0" />
android:pathData="M351.2,256m-27.4,0a27.4,27.4 0,1 1,54.8 0a27.4,27.4 0,1 1,-54.8 0" /> <item
<path android:color="#FFDB2323"
android:fillColor="#CC3333" android:offset="1" />
android:pathData="M160.6,256m-27.4,0a27.4,27.4 0,1 1,54.8 0a27.4,27.4 0,1 1,-54.8 0" /> </gradient>
<path </aapt:attr>
android:fillColor="#CCCCCC" </path>
android:pathData="M255.8,372.8c-25.4,0 -56.2,-4.9 -78.7,-9.5c-20.1,21 -53.7,52.7 -99.6,50.3c-5.7,8.6 -10.2,13.5 -15.5,19.2c48.7,12.3 98.9,-25.8 121.7,-53.3c22.4,5.4 46.7,8.3 72.1,8.3c113,0 204.8,-58.1 206.3,-130C460.7,320.1 368.8,372.8 255.8,372.8z" /> <path
<path android:fillColor="#FFFFFF"
android:fillColor="#00000000" android:fillType="nonZero"
android:pathData="M172,350.9" android:pathData="M144.889,317.876C123.712,301.098 111,279.628 111,256.227C111,202.53 177.933,159 260.5,159C343.067,159 410,202.53 410,256.227C410,309.925 343.067,353.455 260.5,353.455C240.151,353.455 220.751,350.811 203.069,346.022L190.142,358.556C183.117,365.366 174.884,371.529 166.303,376.385C154.928,382.001 143.695,385.065 132.582,386C133.209,384.854 133.787,383.693 134.406,382.546C147.359,358.559 150.854,337.002 144.889,317.876Z"
android:strokeColor="#000000" android:strokeWidth="1"
android:strokeWidth="1" /> android:strokeColor="#00000000" />
<path <path
android:fillColor="#00000000" android:fillType="nonZero"
android:pathData="M200.4,422.9" android:pathData="M167,256a22.04,22 0,1 0,44.081 0a22.04,22 0,1 0,-44.081 0z"
android:strokeColor="#000000" android:strokeWidth="1"
android:strokeWidth="1" /> android:strokeColor="#00000000">
</group> <aapt:attr name="android:fillColor">
<gradient
android:endX="189.0405"
android:endY="271.55902"
android:startX="189.0405"
android:startY="230.61958"
android:type="linear">
<item
android:color="#FFDB2323"
android:offset="0" />
<item
android:color="#FFDB2323"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillType="nonZero"
android:pathData="M237.96,256a22.04,22 0,1 0,44.081 0a22.04,22 0,1 0,-44.081 0z"
android:strokeWidth="1"
android:strokeColor="#00000000">
<aapt:attr name="android:fillColor">
<gradient
android:endX="260.00052"
android:endY="271.55902"
android:startX="260.00052"
android:startY="230.61958"
android:type="linear">
<item
android:color="#FFDB2323"
android:offset="0" />
<item
android:color="#FFDB2323"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillType="nonZero"
android:pathData="M308.919,256a22.04,22 0,1 0,44.081 0a22.04,22 0,1 0,-44.081 0z"
android:strokeWidth="1"
android:strokeColor="#00000000">
<aapt:attr name="android:fillColor">
<gradient
android:endX="330.9595"
android:endY="271.55902"
android:startX="330.9595"
android:startY="230.61958"
android:type="linear">
<item
android:color="#FFDB2323"
android:offset="0" />
<item
android:color="#FFDB2323"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
</vector> </vector>
app/src/main/res/mipmap-hdpi/ic_launcher.png

3.87 KB | W: | H:

app/src/main/res/mipmap-hdpi/ic_launcher.png

2.96 KB | W: | H:

app/src/main/res/mipmap-hdpi/ic_launcher.png
app/src/main/res/mipmap-hdpi/ic_launcher.png
app/src/main/res/mipmap-hdpi/ic_launcher.png
app/src/main/res/mipmap-hdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/mipmap-hdpi/ic_launcher_round.png

3.87 KB | W: | H:

app/src/main/res/mipmap-hdpi/ic_launcher_round.png

4.35 KB | W: | H:

app/src/main/res/mipmap-hdpi/ic_launcher_round.png
app/src/main/res/mipmap-hdpi/ic_launcher_round.png
app/src/main/res/mipmap-hdpi/ic_launcher_round.png
app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/mipmap-mdpi/ic_launcher.png

2.54 KB | W: | H:

app/src/main/res/mipmap-mdpi/ic_launcher.png

1.57 KB | W: | H:

app/src/main/res/mipmap-mdpi/ic_launcher.png
app/src/main/res/mipmap-mdpi/ic_launcher.png
app/src/main/res/mipmap-mdpi/ic_launcher.png
app/src/main/res/mipmap-mdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/mipmap-mdpi/ic_launcher_round.png

2.54 KB | W: | H:

app/src/main/res/mipmap-mdpi/ic_launcher_round.png

2.38 KB | W: | H:

app/src/main/res/mipmap-mdpi/ic_launcher_round.png
app/src/main/res/mipmap-mdpi/ic_launcher_round.png
app/src/main/res/mipmap-mdpi/ic_launcher_round.png
app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/mipmap-xhdpi/ic_launcher.png

5.61 KB | W: | H:

app/src/main/res/mipmap-xhdpi/ic_launcher.png

3.79 KB | W: | H:

app/src/main/res/mipmap-xhdpi/ic_launcher.png
app/src/main/res/mipmap-xhdpi/ic_launcher.png
app/src/main/res/mipmap-xhdpi/ic_launcher.png
app/src/main/res/mipmap-xhdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/mipmap-xhdpi/ic_launcher_round.png

5.61 KB | W: | H:

app/src/main/res/mipmap-xhdpi/ic_launcher_round.png

5.61 KB | W: | H:

app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/mipmap-xxhdpi/ic_launcher.png

8.9 KB | W: | H:

app/src/main/res/mipmap-xxhdpi/ic_launcher.png

7.08 KB | W: | H:

app/src/main/res/mipmap-xxhdpi/ic_launcher.png
app/src/main/res/mipmap-xxhdpi/ic_launcher.png
app/src/main/res/mipmap-xxhdpi/ic_launcher.png
app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png

8.9 KB | W: | H:

app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png

10.6 KB | W: | H:

app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png

12.7 KB | W: | H:

app/src/main/res/mipmap-xxxhdpi/ic_launcher.png

9.4 KB | W: | H:

app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png

12.7 KB | W: | H:

app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png

14 KB | W: | H:

app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -16,6 +16,8 @@ buildscript { ...@@ -16,6 +16,8 @@ buildscript {
classpath 'com.google.gms:google-services:4.0.2' classpath 'com.google.gms:google-services:4.0.2'
classpath 'io.fabric.tools:gradle:1.25.4' classpath 'io.fabric.tools:gradle:1.25.4'
classpath "com.github.ben-manes:gradle-versions-plugin:0.20.0"
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
} }
......
...@@ -10,28 +10,30 @@ ext { ...@@ -10,28 +10,30 @@ ext {
// For app // For app
kotlin : '1.2.61', kotlin : '1.2.61',
coroutine : '0.24.0', coroutine : '0.25.0',
appCompat : '1.0.0-beta01', appCompat : '1.0.0-rc02',
recyclerview : '1.0.0-beta01', recyclerview : '1.0.0-rc02',
constraintLayout : '2.0.0-alpha1', constraintLayout : '2.0.0-alpha2',
cardview : '1.0.0-beta01', cardview : '1.0.0-rc02',
browser : '1.0.0-beta01', browser : '1.0.0-rc02',
androidKtx : '1.0.0-beta01', androidKtx : '1.0.0-rc02',
dagger : '2.16', dagger : '2.16',
firebaseCloudMessage : '17.1.0', firebaseCloudMessage : '17.3.0',
firebaseAnalytics : '16.0.3', firebaseAnalytics : '16.0.3',
playServices : '15.0.1', playServices : '16.0.0',
exoPlayer : '2.8.2', exoPlayer : '2.8.2',
flexbox : '1.0.0', flexbox : '1.0.0',
material : '1.0.0-beta01', material : '1.0.0-rc01',
room : '2.0.0-beta01', room : '2.0.0-rc01',
lifecycle : '2.0.0-beta01', lifecycle : '2.0.0-rc01',
rxKotlin : '2.2.0', livedataKtx : '2.0.1',
rxAndroid : '2.0.2',
rxKotlin : '2.3.0',
rxAndroid : '2.1.0',
moshi : '1.6.0', moshi : '1.6.0',
okhttp : '3.11.0', okhttp : '3.11.0',
...@@ -45,9 +47,9 @@ ext { ...@@ -45,9 +47,9 @@ ext {
kotshi : '1.0.4', kotshi : '1.0.4',
frescoImageViewer : '0.5.1', frescoImageViewer : '0.5.1',
markwon : '1.1.0', markwon : '1.1.1',
aVLoadingIndicatorView: '2.1.3', aVLoadingIndicatorView: '2.1.3',
glide : '4.8.0-SNAPSHOT', glide : '4.8.0',
// For wearable // For wearable
wear : '2.3.0', wear : '2.3.0',
...@@ -85,6 +87,8 @@ ext { ...@@ -85,6 +87,8 @@ ext {
lifecycleExtensions : "androidx.lifecycle:lifecycle-extensions:${versions.lifecycle}", lifecycleExtensions : "androidx.lifecycle:lifecycle-extensions:${versions.lifecycle}",
lifecycleCompiler : "androidx.lifecycle:lifecycle-compiler:${versions.lifecycle}", lifecycleCompiler : "androidx.lifecycle:lifecycle-compiler:${versions.lifecycle}",
livedataKtx : "com.shopify:livedata-ktx:${versions.livedataKtx}",
rxKotlin : "io.reactivex.rxjava2:rxkotlin:${versions.rxKotlin}", rxKotlin : "io.reactivex.rxjava2:rxkotlin:${versions.rxKotlin}",
rxAndroid : "io.reactivex.rxjava2:rxandroid:${versions.rxAndroid}", rxAndroid : "io.reactivex.rxjava2:rxandroid:${versions.rxAndroid}",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment