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
68232055
Commit
68232055
authored
Mar 07, 2017
by
Tiago Cunha
Committed by
GitHub
Mar 07, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #231 from RocketChat/fix/update-tooling
Some updates and clean ups to tooling
parents
ffaa0baf
10cff3cf
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
30 additions
and
42 deletions
+30
-42
build.gradle
android-ddp/build.gradle
+1
-1
RxWebSocket.java
...src/main/java/chat/rocket/android_ddp/rx/RxWebSocket.java
+4
-9
build.gradle
app/build.gradle
+5
-5
RoomFragment.java
...a/chat/rocket/android/fragment/chatroom/RoomFragment.java
+2
-3
SidebarMainFragment.java
.../rocket/android/fragment/sidebar/SidebarMainFragment.java
+5
-7
AddChannelDialogFragment.java
...oid/fragment/sidebar/dialog/AddChannelDialogFragment.java
+3
-4
AddDirectMessageDialogFragment.java
...agment/sidebar/dialog/AddDirectMessageDialogFragment.java
+2
-3
dependencies.gradle
dependencies.gradle
+3
-3
build.gradle
log-wrapper/build.gradle
+1
-1
build.gradle
persistence-realm/build.gradle
+2
-2
build.gradle
rocket-chat-android-widgets/build.gradle
+2
-4
No files found.
android-ddp/build.gradle
View file @
68232055
...
...
@@ -6,7 +6,7 @@ buildscript {
jcenter
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:2.
2.3
'
classpath
'com.android.tools.build:gradle:2.
3.0
'
classpath
'me.tatarka:gradle-retrolambda:3.5.0'
classpath
'me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2'
}
...
...
android-ddp/src/main/java/chat/rocket/android_ddp/rx/RxWebSocket.java
View file @
68232055
...
...
@@ -2,7 +2,6 @@ package chat.rocket.android_ddp.rx;
import
io.reactivex.BackpressureStrategy
;
import
io.reactivex.Flowable
;
import
io.reactivex.FlowableEmitter
;
import
io.reactivex.FlowableOnSubscribe
;
import
io.reactivex.exceptions.OnErrorNotImplementedException
;
import
io.reactivex.flowables.ConnectableFlowable
;
...
...
@@ -27,11 +26,8 @@ public class RxWebSocket {
final
Request
request
=
new
Request
.
Builder
().
url
(
url
).
build
();
return
Flowable
.
create
(
new
FlowableOnSubscribe
<
RxWebSocketCallback
.
Base
>()
{
@Override
public
void
subscribe
(
FlowableEmitter
<
RxWebSocketCallback
.
Base
>
emitter
)
throws
Exception
{
httpClient
.
newWebSocket
(
request
,
new
WebSocketListener
()
{
(
FlowableOnSubscribe
<
RxWebSocketCallback
.
Base
>)
emitter
->
httpClient
.
newWebSocket
(
request
,
new
WebSocketListener
()
{
@Override
public
void
onOpen
(
WebSocket
webSocket
,
Response
response
)
{
RxWebSocket
.
this
.
webSocket
=
webSocket
;
...
...
@@ -57,9 +53,8 @@ public class RxWebSocket {
emitter
.
onNext
(
new
RxWebSocketCallback
.
Close
(
webSocket
,
code
,
reason
));
emitter
.
onComplete
();
}
});
}
},
BackpressureStrategy
.
BUFFER
}),
BackpressureStrategy
.
BUFFER
).
publish
();
}
...
...
app/build.gradle
View file @
68232055
...
...
@@ -10,7 +10,7 @@ buildscript {
mavenCentral
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:2.
2.3
'
classpath
'com.android.tools.build:gradle:2.
3.0
'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
...
...
@@ -75,10 +75,10 @@ play {
}
ext
{
supportVersion
=
'25.
1.1
'
supportVersion
=
'25.
2.0
'
playLibVersion
=
'10.2.0'
stethoVersion
=
'1.4.2'
rxbindingVersion
=
'
1
.0.0'
rxbindingVersion
=
'
2
.0.0'
rxlifecycleVersion
=
'2.0.1'
icepickVersion
=
'3.2.0'
permissionsdispatcherVersion
=
'2.3.1'
...
...
@@ -107,8 +107,8 @@ dependencies {
compile
"com.facebook.stetho:stetho-okhttp3:$stethoVersion"
compile
'com.uphyca:stetho_realm:2.0.1'
compile
"com.jakewharton.rxbinding:rxbinding:$rxbindingVersion"
compile
"com.jakewharton.rxbinding:rxbinding-support-v4:$rxbindingVersion"
compile
"com.jakewharton.rxbinding
2
:rxbinding:$rxbindingVersion"
compile
"com.jakewharton.rxbinding
2
:rxbinding-support-v4:$rxbindingVersion"
compile
"com.trello.rxlifecycle2:rxlifecycle:$rxlifecycleVersion"
compile
"com.trello.rxlifecycle2:rxlifecycle-android:$rxlifecycleVersion"
...
...
app/src/main/java/chat/rocket/android/fragment/chatroom/RoomFragment.java
View file @
68232055
...
...
@@ -20,7 +20,7 @@ import android.support.v7.widget.LinearLayoutManager;
import
android.support.v7.widget.RecyclerView
;
import
android.view.View
;
import
com.jakewharton.rxbinding.support.v4.widget.RxDrawerLayout
;
import
com.jakewharton.rxbinding
2
.support.v4.widget.RxDrawerLayout
;
import
java.lang.reflect.Field
;
import
java.util.ArrayList
;
...
...
@@ -57,7 +57,6 @@ import chat.rocket.persistence.realm.RealmStore;
import
chat.rocket.android.service.ConnectivityManager
;
import
chat.rocket.android.widget.internal.ExtraActionPickerDialogFragment
;
import
chat.rocket.android.widget.message.MessageFormLayout
;
import
hu.akarnokd.rxjava.interop.RxJavaInterop
;
import
permissions.dispatcher.NeedsPermission
;
import
permissions.dispatcher.RuntimePermissions
;
...
...
@@ -235,7 +234,7 @@ public class RoomFragment extends AbstractChatRoomFragment
DrawerLayout
drawerLayout
=
(
DrawerLayout
)
rootView
.
findViewById
(
R
.
id
.
drawer_layout
);
SlidingPaneLayout
pane
=
(
SlidingPaneLayout
)
getActivity
().
findViewById
(
R
.
id
.
sliding_pane
);
if
(
drawerLayout
!=
null
&&
pane
!=
null
)
{
Rx
JavaInterop
.
toV2Flowable
(
RxDrawerLayout
.
drawerOpen
(
drawerLayout
,
GravityCompat
.
END
)
)
Rx
DrawerLayout
.
drawerOpen
(
drawerLayout
,
GravityCompat
.
END
)
.
compose
(
bindToLifecycle
())
.
subscribe
(
opened
->
{
try
{
...
...
app/src/main/java/chat/rocket/android/fragment/sidebar/SidebarMainFragment.java
View file @
68232055
...
...
@@ -10,7 +10,8 @@ import android.view.View;
import
android.widget.CompoundButton
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
com.jakewharton.rxbinding.widget.RxCompoundButton
;
import
com.jakewharton.rxbinding2.widget.RxCompoundButton
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -34,7 +35,6 @@ import chat.rocket.android.renderer.UserRenderer;
import
chat.rocket.persistence.realm.repositories.RealmRoomRepository
;
import
chat.rocket.persistence.realm.repositories.RealmUserRepository
;
import
chat.rocket.android.widget.RocketChatAvatar
;
import
hu.akarnokd.rxjava.interop.RxJavaInterop
;
public
class
SidebarMainFragment
extends
AbstractFragment
implements
SidebarMainContract
.
View
{
...
...
@@ -119,12 +119,10 @@ public class SidebarMainFragment extends AbstractFragment implements SidebarMain
rootView
.
findViewById
(
R
.
id
.
user_info_container
)
.
setOnClickListener
(
view
->
toggleUserAction
.
toggle
());
Rx
JavaInterop
.
toV2Flowable
(
RxCompoundButton
.
checkedChanges
(
toggleUserAction
)
)
Rx
CompoundButton
.
checkedChanges
(
toggleUserAction
)
.
compose
(
bindToLifecycle
())
.
subscribe
(
aBoolean
->
{
rootView
.
findViewById
(
R
.
id
.
user_action_outer_container
)
.
setVisibility
(
aBoolean
?
View
.
VISIBLE
:
View
.
GONE
);
});
.
subscribe
(
aBoolean
->
rootView
.
findViewById
(
R
.
id
.
user_action_outer_container
)
.
setVisibility
(
aBoolean
?
View
.
VISIBLE
:
View
.
GONE
));
}
private
void
setupUserStatusButtons
()
{
...
...
app/src/main/java/chat/rocket/android/fragment/sidebar/dialog/AddChannelDialogFragment.java
View file @
68232055
...
...
@@ -4,12 +4,12 @@ import android.os.Bundle;
import
android.view.View
;
import
android.widget.CompoundButton
;
import
android.widget.TextView
;
import
com.jakewharton.rxbinding.widget.RxTextView
;
import
com.jakewharton.rxbinding2.widget.RxTextView
;
import
bolts.Task
;
import
chat.rocket.android.R
;
import
chat.rocket.android.helper.TextUtils
;
import
hu.akarnokd.rxjava.interop.RxJavaInterop
;
/**
* add Channel, add Private-group.
...
...
@@ -36,8 +36,7 @@ public class AddChannelDialogFragment extends AbstractAddRoomDialogFragment {
protected
void
onSetupDialog
()
{
View
buttonAddChannel
=
getDialog
().
findViewById
(
R
.
id
.
btn_add_channel
);
RxJavaInterop
.
toV2Flowable
(
RxTextView
.
textChanges
((
TextView
)
getDialog
().
findViewById
(
R
.
id
.
editor_channel_name
)))
RxTextView
.
textChanges
((
TextView
)
getDialog
().
findViewById
(
R
.
id
.
editor_channel_name
))
.
map
(
text
->
!
TextUtils
.
isEmpty
(
text
))
.
compose
(
bindToLifecycle
())
.
subscribe
(
buttonAddChannel:
:
setEnabled
);
...
...
app/src/main/java/chat/rocket/android/fragment/sidebar/dialog/AddDirectMessageDialogFragment.java
View file @
68232055
...
...
@@ -4,7 +4,7 @@ import android.os.Bundle;
import
android.view.View
;
import
android.widget.AutoCompleteTextView
;
import
android.widget.TextView
;
import
com.jakewharton.rxbinding.widget.RxTextView
;
import
com.jakewharton.rxbinding
2
.widget.RxTextView
;
import
io.realm.Case
;
import
bolts.Task
;
...
...
@@ -13,7 +13,6 @@ import chat.rocket.android.helper.TextUtils;
import
chat.rocket.android.layouthelper.sidebar.dialog.SuggestUserAdapter
;
import
chat.rocket.persistence.realm.models.ddp.RealmUser
;
import
chat.rocket.persistence.realm.RealmAutoCompleteAdapter
;
import
hu.akarnokd.rxjava.interop.RxJavaInterop
;
/**
* add Direct RealmMessage.
...
...
@@ -47,7 +46,7 @@ public class AddDirectMessageDialogFragment extends AbstractAddRoomDialogFragmen
context
->
new
SuggestUserAdapter
(
context
,
hostname
));
autoCompleteTextView
.
setAdapter
(
adapter
);
Rx
JavaInterop
.
toV2Flowable
(
RxTextView
.
textChanges
(
autoCompleteTextView
)
)
Rx
TextView
.
textChanges
(
autoCompleteTextView
)
.
map
(
text
->
!
TextUtils
.
isEmpty
(
text
))
.
compose
(
bindToLifecycle
())
.
subscribe
(
buttonAddDirectMessage:
:
setEnabled
);
...
...
dependencies.gradle
View file @
68232055
ext
{
preDexLibs
=
!
"true"
.
equals
(
System
.
getenv
(
"CI"
)
)
preDexLibs
=
"true"
!=
System
.
getenv
(
"CI"
)
}
subprojects
{
project
.
plugins
.
whenPluginAdded
{
plugin
->
if
(
"com.android.build.gradle.AppPlugin"
.
equals
(
plugin
.
class
.
name
)
)
{
if
(
"com.android.build.gradle.AppPlugin"
==
plugin
.
class
.
name
)
{
project
.
android
.
dexOptions
.
preDexLibraries
=
rootProject
.
ext
.
preDexLibs
}
else
if
(
"com.android.build.gradle.LibraryPlugin"
.
equals
(
plugin
.
class
.
name
)
)
{
}
else
if
(
"com.android.build.gradle.LibraryPlugin"
==
plugin
.
class
.
name
)
{
project
.
android
.
dexOptions
.
preDexLibraries
=
rootProject
.
ext
.
preDexLibs
}
}
...
...
log-wrapper/build.gradle
View file @
68232055
...
...
@@ -5,7 +5,7 @@ buildscript {
jcenter
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:2.
2.3
'
classpath
'com.android.tools.build:gradle:2.
3.0
'
}
}
...
...
persistence-realm/build.gradle
View file @
68232055
...
...
@@ -8,7 +8,7 @@ buildscript {
jcenter
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:2.
2.3
'
classpath
'com.android.tools.build:gradle:2.
3.0
'
classpath
'io.realm:realm-gradle-plugin:2.3.1'
classpath
'me.tatarka:gradle-retrolambda:3.5.0'
classpath
'me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2'
...
...
@@ -39,7 +39,7 @@ android {
}
ext
{
supportVersion
=
'25.
1.1
'
supportVersion
=
'25.
2.0
'
}
dependencies
{
...
...
rocket-chat-android-widgets/build.gradle
View file @
68232055
...
...
@@ -5,7 +5,7 @@ buildscript {
jcenter
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:2.
2.3
'
classpath
'com.android.tools.build:gradle:2.
3.0
'
}
}
...
...
@@ -30,7 +30,7 @@ android {
}
ext
{
supportVersion
=
'25.
1.1
'
supportVersion
=
'25.
2.0
'
frescoVersion
=
'1.1.0'
}
...
...
@@ -48,8 +48,6 @@ dependencies {
compile
'com.squareup.okhttp3:okhttp:3.6.0'
compile
'com.parse.bolts:bolts-tasks:1.4.0'
compile
'com.github.yusukeiwaki.android-widget:widget-fontawesome:0.0.1'
compile
"com.facebook.fresco:fresco:$frescoVersion"
...
...
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