Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
a4fea57f
Commit
a4fea57f
authored
May 30, 2017
by
Matheus Jardim Bernardes
Committed by
GitHub
May 30, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into fix_noti_and_round_avatar
parents
d0197450
1b154fb9
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
56 additions
and
46 deletions
+56
-46
.travis.yml
.travis.yml
+1
-1
build.gradle
android-ddp/build.gradle
+6
-6
build.gradle
app/build.gradle
+10
-8
AbstractRenderer.java
...n/java/chat/rocket/android/renderer/AbstractRenderer.java
+15
-13
circle.yml
circle.yml
+2
-2
build.gradle
log-wrapper/build.gradle
+2
-2
build.gradle
persistence-realm/build.gradle
+5
-5
RealmMessageRepository.java
...ersistence/realm/repositories/RealmMessageRepository.java
+7
-3
build.gradle
rocket-chat-android-widgets/build.gradle
+5
-5
UserViewHolder.java
...roid/widget/message/autocomplete/user/UserViewHolder.java
+2
-0
build.gradle
rocket-chat-core/build.gradle
+1
-1
No files found.
.travis.yml
View file @
a4fea57f
...
...
@@ -7,7 +7,7 @@ before_script:
-
echo y | android update sdk --no-ui --all --filter android-25
-
echo y | android update sdk --no-ui --all --filter extra-android-m2repository,extra-android-support
-
echo y | android update sdk --no-ui --all --filter extra-google-m2repository,extra-google-google_play_services
-
echo y | android update sdk --no-ui --all --filter build-tools-25.0.
2
-
echo y | android update sdk --no-ui --all --filter build-tools-25.0.
3
-
./gradlew dependencies
script
:
...
...
android-ddp/build.gradle
View file @
a4fea57f
...
...
@@ -6,15 +6,15 @@ buildscript {
jcenter
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:2.3.
1
'
classpath
'me.tatarka:gradle-retrolambda:3.
5.0
'
classpath
'com.android.tools.build:gradle:2.3.
2
'
classpath
'me.tatarka:gradle-retrolambda:3.
6.1
'
classpath
'me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2'
}
}
android
{
compileSdkVersion
25
buildToolsVersion
'25.0.
2
'
buildToolsVersion
'25.0.
3
'
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
...
@@ -35,7 +35,7 @@ android {
}
ext
{
supportVersion
=
'25.
1
.1'
supportVersion
=
'25.
3
.1'
}
dependencies
{
...
...
@@ -43,9 +43,9 @@ dependencies {
compile
"com.android.support:support-annotations:$supportVersion"
compile
'com.squareup.okhttp3:okhttp:3.
6
.0'
compile
'com.squareup.okhttp3:okhttp:3.
8
.0'
compile
'io.reactivex.rxjava2:rxjava:2.
0.6
'
compile
'io.reactivex.rxjava2:rxjava:2.
1.0
'
compile
'com.parse.bolts:bolts-tasks:1.4.0'
}
app/build.gradle
View file @
a4fea57f
...
...
@@ -10,7 +10,7 @@ buildscript {
mavenCentral
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:2.3.
1
'
classpath
'com.android.tools.build:gradle:2.3.
2
'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
...
...
@@ -28,13 +28,13 @@ buildscript {
android
{
compileSdkVersion
25
buildToolsVersion
'25.0.
2
'
buildToolsVersion
'25.0.
3
'
defaultConfig
{
applicationId
"chat.rocket.android"
minSdkVersion
16
targetSdkVersion
25
versionCode
22
versionName
"1.0.1
2
"
versionName
"1.0.1
3
"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
vectorDrawables
.
useSupportLibrary
=
true
...
...
@@ -75,13 +75,13 @@ play {
}
ext
{
supportVersion
=
'25.
2.0
'
playLibVersion
=
'10.2.
0
'
supportVersion
=
'25.
3.1
'
playLibVersion
=
'10.2.
6
'
stethoVersion
=
'1.4.2'
rxbindingVersion
=
'2.0.0'
rxlifecycleVersion
=
'2.
0.1
'
rxlifecycleVersion
=
'2.
1.0
'
icepickVersion
=
'3.2.0'
permissionsdispatcherVersion
=
'2.
3.1
'
permissionsdispatcherVersion
=
'2.
4.0
'
}
dependencies
{
...
...
@@ -101,7 +101,7 @@ dependencies {
compile
"com.google.android.gms:play-services-gcm:$playLibVersion"
compile
'com.squareup.okhttp3:okhttp:3.
6
.0'
compile
'com.squareup.okhttp3:okhttp:3.
8
.0'
compile
"com.facebook.stetho:stetho:$stethoVersion"
compile
"com.facebook.stetho:stetho-okhttp3:$stethoVersion"
...
...
@@ -124,6 +124,8 @@ dependencies {
compile
"com.github.hotchemi:permissionsdispatcher:$permissionsdispatcherVersion"
annotationProcessor
"com.github.hotchemi:permissionsdispatcher-processor:$permissionsdispatcherVersion"
compile
"com.android.support:support-annotations:$supportVersion"
}
apply
plugin:
'com.google.gms.google-services'
app/src/main/java/chat/rocket/android/renderer/AbstractRenderer.java
View file @
a4fea57f
package
chat
.
rocket
.
android
.
renderer
;
import
android.content.Context
;
import
android.support.annotation.Nullable
;
import
android.view.View
;
import
chat.rocket.android.renderer.optional.Condition
;
...
...
@@ -15,27 +16,28 @@ abstract class AbstractRenderer<T> {
this
.
object
=
object
;
}
// TODO should we get rid of this simpler version of 'shouldHandle'?
protected
boolean
shouldHandle
(
View
view
)
{
return
object
!=
null
&&
view
!=
null
;
}
protected
boolean
shouldHandle
(
View
target
,
Condition
additionalCondition
,
Optional
optional
,
String
key
)
{
if
(
target
==
null
||
object
==
null
)
{
if
(
optional
!=
null
)
{
optional
.
onNoData
(
key
);
}
protected
boolean
shouldHandle
(
View
target
,
@Nullable
Condition
additionalCondition
,
Optional
optional
,
@Nullable
String
key
)
{
if
(
target
==
null
)
{
return
false
;
}
if
(
optional
!=
null
)
{
if
(!
additionalCondition
.
isOK
())
{
optional
.
onNoData
(
key
);
return
false
;
}
else
{
if
(
object
==
null
)
{
optional
.
onNoData
(
key
);
}
else
{
if
(
additionalCondition
==
null
||
additionalCondition
.
isOK
())
{
optional
.
onDataExists
(
key
);
return
true
;
}
else
{
optional
.
onNoData
(
key
);
}
}
return
tru
e
;
return
fals
e
;
}
}
circle.yml
View file @
a4fea57f
...
...
@@ -26,10 +26,10 @@ dependencies:
-
echo y | android update sdk --no-ui --all --filter android-25
-
echo y | android update sdk --no-ui --all --filter extra-android-m2repository,extra-android-support
-
echo y | android update sdk --no-ui --all --filter extra-google-m2repository,extra-google-google_play_services
-
echo y | android update sdk --no-ui --all --filter build-tools-25.0.
2
-
echo y | android update sdk --no-ui --all --filter build-tools-25.0.
3
cache_directories
:
-
/usr/local/android-sdk-linux/tools
-
/usr/local/android-sdk-linux/build-tools/25.0.
2
-
/usr/local/android-sdk-linux/build-tools/25.0.
3
test
:
override
:
...
...
log-wrapper/build.gradle
View file @
a4fea57f
...
...
@@ -5,13 +5,13 @@ buildscript {
jcenter
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:2.3.
1
'
classpath
'com.android.tools.build:gradle:2.3.
2
'
}
}
android
{
compileSdkVersion
25
buildToolsVersion
'25.0.
2
'
buildToolsVersion
'25.0.
3
'
defaultConfig
{
minSdkVersion
16
...
...
persistence-realm/build.gradle
View file @
a4fea57f
...
...
@@ -8,7 +8,7 @@ buildscript {
jcenter
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:2.3.
1
'
classpath
'com.android.tools.build:gradle:2.3.
2
'
classpath
'io.realm:realm-gradle-plugin:2.3.2'
classpath
'me.tatarka:gradle-retrolambda:3.5.0'
classpath
'me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2'
...
...
@@ -18,7 +18,7 @@ buildscript {
android
{
compileSdkVersion
25
buildToolsVersion
'25.0.
2
'
buildToolsVersion
'25.0.
3
'
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
...
@@ -39,7 +39,7 @@ android {
}
ext
{
supportVersion
=
'25.
2.0
'
supportVersion
=
'25.
3.1
'
}
dependencies
{
...
...
@@ -50,10 +50,10 @@ dependencies {
compile
"com.android.support:appcompat-v7:$supportVersion"
compile
"com.android.support:design:$supportVersion"
compile
'io.reactivex.rxjava2:rxjava:2.
0.6
'
compile
'io.reactivex.rxjava2:rxjava:2.
1.0
'
compile
'io.reactivex.rxjava2:rxandroid:2.0.1'
compile
'com.github.akarnokd:rxjava2-interop:0.
9.1
'
compile
'com.github.akarnokd:rxjava2-interop:0.
10.0
'
compile
'com.parse.bolts:bolts-tasks:1.4.0'
...
...
persistence-realm/src/main/java/chat/rocket/persistence/realm/repositories/RealmMessageRepository.java
View file @
a4fea57f
...
...
@@ -2,7 +2,9 @@ package chat.rocket.persistence.realm.repositories;
import
android.os.Looper
;
import
android.support.v4.util.Pair
;
import
com.fernandocejas.arrow.optional.Optional
;
import
io.reactivex.Flowable
;
import
io.reactivex.Single
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
...
...
@@ -12,6 +14,7 @@ import io.realm.Sort;
import
java.util.ArrayList
;
import
java.util.List
;
import
chat.rocket.core.models.Message
;
import
chat.rocket.core.models.Room
;
import
chat.rocket.core.models.User
;
...
...
@@ -75,10 +78,11 @@ public class RealmMessageRepository extends RealmRepository implements MessageRe
RealmUser
realmUser
=
realmMessage
.
getUser
();
if
(
realmUser
==
null
)
{
realmUser
=
new
RealmUser
();
realmUser
=
realm
.
where
(
RealmUser
.
class
)
.
equalTo
(
RealmUser
.
ID
,
message
.
getUser
().
getId
())
.
findFirst
();
}
realmUser
.
setId
(
message
.
getUser
().
getId
());
realmMessage
.
setUser
(
realmUser
);
realm
.
beginTransaction
();
...
...
rocket-chat-android-widgets/build.gradle
View file @
a4fea57f
...
...
@@ -5,13 +5,13 @@ buildscript {
jcenter
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:2.3.
1
'
classpath
'com.android.tools.build:gradle:2.3.
2
'
}
}
android
{
compileSdkVersion
25
buildToolsVersion
'25.0.
2
'
buildToolsVersion
'25.0.
3
'
defaultConfig
{
minSdkVersion
16
...
...
@@ -30,8 +30,8 @@ android {
}
ext
{
supportVersion
=
'25.
2.0
'
frescoVersion
=
'1.
1
.0'
supportVersion
=
'25.
3.1
'
frescoVersion
=
'1.
3
.0'
rxbindingVersion
=
'2.0.0'
}
...
...
@@ -49,7 +49,7 @@ dependencies {
compile
'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
compile
'com.squareup.okhttp3:okhttp:3.
6
.0'
compile
'com.squareup.okhttp3:okhttp:3.
8
.0'
compile
'com.github.yusukeiwaki.android-widget:widget-fontawesome:0.0.1'
...
...
rocket-chat-android-widgets/src/main/java/chat/rocket/android/widget/message/autocomplete/user/UserViewHolder.java
View file @
a4fea57f
...
...
@@ -12,6 +12,7 @@ import com.amulyakhare.textdrawable.TextDrawable;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
chat.rocket.android.widget.AbsoluteUrl
;
import
chat.rocket.android.widget.R
;
import
chat.rocket.android.widget.RocketChatAvatar
;
...
...
@@ -81,6 +82,7 @@ public class UserViewHolder extends AutocompleteViewHolder<UserItem> {
//REMARK! this is often SVG image! (see: Rocket.Chat:server/startup/avatar.coffee)
try
{
final
String
avatarUrl
=
"/avatar/"
+
URLEncoder
.
encode
(
username
,
"UTF-8"
)
+
".jpg"
;
// TODO why absoluteUrl is nullable? By allowing that, the app tries to load non-existing images
if
(
absoluteUrl
==
null
)
{
return
avatarUrl
;
}
...
...
rocket-chat-core/build.gradle
View file @
a4fea57f
...
...
@@ -12,7 +12,7 @@ dependencies {
compile
'com.google.code.findbugs:jsr305:3.0.1'
compile
'io.reactivex.rxjava2:rxjava:2.
0.6
'
compile
'io.reactivex.rxjava2:rxjava:2.
1.0
'
compile
'com.fernandocejas:arrow:1.0.0'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment