Skip to content

Commit

Permalink
Merge branch 'develop' into login
Browse files Browse the repository at this point in the history
  • Loading branch information
TimCastelijns committed Oct 4, 2018
2 parents c599da8 + 54b1cf7 commit 34d8bfc
Show file tree
Hide file tree
Showing 48 changed files with 200 additions and 929 deletions.
51 changes: 30 additions & 21 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ repositories {
}

android {
compileSdkVersion 27
buildToolsVersion '28.0.2'
compileSdkVersion 28
buildToolsVersion buildToolsVersion
defaultConfig {
applicationId 'com.tristanwiley.chatse'
minSdkVersion 16
targetSdkVersion 27
targetSdkVersion 28
versionCode 3
versionName "0.1.0_Alpha_$versionCode"

Expand All @@ -43,6 +43,11 @@ android {
}
productFlavors {
}

configurations.all {
resolutionStrategy.force "com.android.support:animated-vector-drawable:$supportLibrary"
resolutionStrategy.force "com.android.support:support-v4:$supportLibrary"
}
}

dependencies {
Expand All @@ -56,12 +61,12 @@ dependencies {
implementation 'com.jakewharton.timber:timber:4.7.1'

// Android
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:palette-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation "com.android.support:design:$supportLibrary"
implementation "com.android.support:appcompat-v7:$supportLibrary"
implementation "com.android.support:recyclerview-v7:$supportLibrary"
implementation "com.android.support:cardview-v7:$supportLibrary"
implementation "com.android.support:palette-v7:$supportLibrary"
implementation "com.android.support.constraint:constraint-layout:$constraintlayout"

// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
Expand All @@ -70,22 +75,26 @@ dependencies {
implementation 'io.reactivex.rxjava2:rxjava:2.2.2'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'

implementation 'com.squareup.okhttp:okhttp:2.4.0'
implementation 'com.squareup.okhttp:okhttp-ws:2.4.0'
implementation 'org.jetbrains.anko:anko-commons:0.10.4'
implementation 'org.jsoup:jsoup:1.10.2'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.7'
implementation 'org.unbescape:unbescape:1.1.1.RELEASE'
implementation 'com.orhanobut:dialogplus:1.11@aar'
implementation 'me.saket:better-link-movement-method:1.2'
implementation 'com.github.gabrielemariotti.changeloglib:changelog:2.1.0'
implementation 'com.github.bumptech.glide:glide:4.7.1'
kapt 'com.github.bumptech.glide:compiler:4.7.1'
// Glide
implementation "com.github.bumptech.glide:glide:$glide"
kapt "com.github.bumptech.glide:compiler:$glide"

// OkHttp
implementation "com.squareup.okhttp:okhttp:$okhttp"
implementation "com.squareup.okhttp:okhttp-ws:$okhttp"

implementation "org.jetbrains.anko:anko-commons:$anko"
implementation "org.jsoup:jsoup:$jsoup"
implementation "com.fasterxml.jackson.core:jackson-databind:$jacksondatabinding"
implementation "org.unbescape:unbescape:$ubescope"
implementation "com.orhanobut:dialogplus:$dialog"
implementation "me.saket:better-link-movement-method:$saketbetterlinkmovement"
implementation "com.github.gabrielemariotti.changeloglib:$gabriel"

// Testing
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.0.0-RC2"
testImplementation 'com.squareup.okhttp:mockwebserver:2.4.0'
}

apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android-extensions'
27 changes: 0 additions & 27 deletions app/src/main/java/com/tristanwiley/chatse/BaseActivity.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import com.bumptech.glide.Glide
import com.bumptech.glide.request.RequestOptions
import com.tristanwiley.chatse.R
import com.tristanwiley.chatse.about.pokos.DevPoko

Expand All @@ -35,6 +36,7 @@ class AboutDevCardAdapter(mContext: Context, val data: ArrayList<DevPoko>) : Rec

Glide.with(itemView.context)
.load(item.imageRes)
.apply(RequestOptions().circleCrop())
.into(picture)

name.text = item.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class CoreDividerItemDecoration @JvmOverloads constructor(context: Context, orie
/**
* Draws the divider depending on the orientation of the RecyclerView.
*/
override fun onDraw(c: Canvas, parent: RecyclerView, state: RecyclerView.State?) {
override fun onDraw(c: Canvas, parent: RecyclerView, state: RecyclerView.State) {
when (orientation) {
VERTICAL_LIST -> drawVertical(c, parent)
HORIZONTAL_LIST -> drawHorizontal(c, parent)
Expand Down Expand Up @@ -95,7 +95,7 @@ class CoreDividerItemDecoration @JvmOverloads constructor(context: Context, orie
/**
* Determines the offset of the divider based on the orientation of the list.
*/
override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State?) {
override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State) {
when (orientation) {
VERTICAL_LIST -> outRect.set(0, 0, 0, divider.intrinsicHeight)
HORIZONTAL_LIST -> outRect.set(0, 0, divider.intrinsicWidth, 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ class MessageAdapter(
private var messages: ArrayList<MessageEvent> = ArrayList(),
private val messageCallback: ChatMessageCallback) : RecyclerView.Adapter<MessageAdapter.MessageViewHolder>(), SelectedMessagesListener {

init {
setHasStableIds(true)
}

private val selectedMessages: HashSet<Int> = HashSet()

override fun selectMessage(mId: Int) {
Expand Down Expand Up @@ -94,6 +98,8 @@ class MessageAdapter(

override fun getItemCount() = messages.size

override fun getItemId(position: Int) = messages[position].id

/**
* ViewHolder that handles setting all content in itemView
*/
Expand Down Expand Up @@ -562,4 +568,4 @@ class MessageAdapter(
return if (swatches.size > 0) swatches[0].rgb else ContextCompat.getColor(mContext, (R.color.primary))
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ package com.tristanwiley.chatse.login
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.view.inputmethod.EditorInfo
import android.widget.Toast
import com.tristanwiley.chatse.BaseActivity
import com.tristanwiley.chatse.R
import com.tristanwiley.chatse.chat.ChatActivity
import com.tristanwiley.chatse.extensions.showIf
import kotlinx.android.synthetic.main.activity_login.*

class LoginActivity : BaseActivity(), LoginView {
class LoginActivity : AppCompatActivity(), LoginView {

private lateinit var presenter: LoginPresenter

Expand Down
Loading

0 comments on commit 34d8bfc

Please sign in to comment.