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
d9aff05a
Commit
d9aff05a
authored
Jun 09, 2017
by
Vincenzo
Committed by
GitHub
Jun 09, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into fix_247_change-hostname
parents
4bf98ee3
449d6243
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
12 deletions
+23
-12
README.md
README.md
+1
-1
build.gradle
app/build.gradle
+2
-2
AbstractAuthedActivity.java
.../chat/rocket/android/activity/AbstractAuthedActivity.java
+13
-6
MainActivity.java
.../main/java/chat/rocket/android/activity/MainActivity.java
+2
-2
MainContract.java
.../main/java/chat/rocket/android/activity/MainContract.java
+2
-0
MainPresenter.java
...main/java/chat/rocket/android/activity/MainPresenter.java
+1
-0
message_avatar.xml
...at-android-widgets/src/main/res/layout/message_avatar.xml
+2
-1
No files found.
README.md
View file @
d9aff05a
[
![CircleCI
](
https://circleci.com/gh/RocketChat/Rocket.Chat.Android/tree/develop.svg?style=shield
)
](https://circleci.com/gh/RocketChat/Rocket.Chat.Android/tree/develop)
[
![Build Status
](
https://travis-ci.org/RocketChat/Rocket.Chat.Android.svg?branch=develop
)
](https://travis-ci.org/RocketChat/Rocket.Chat.Android)
[
![CircleCI
](
https://circleci.com/gh/RocketChat/Rocket.Chat.Android/tree/develop.svg?style=shield
)
](https://circleci.com/gh/RocketChat/Rocket.Chat.Android/tree/develop)
[
![Build Status
](
https://travis-ci.org/RocketChat/Rocket.Chat.Android.svg?branch=develop
)
](https://travis-ci.org/RocketChat/Rocket.Chat.Android)
[
![Codacy Badge
](
https://api.codacy.com/project/badge/Grade/a81156a8682e4649994270d3670c3c83
)
](https://www.codacy.com/app/matheusjardimb/Rocket.Chat.Android)
# Rocket.Chat.Android
Rocket.Chat Native Android Application.
...
...
app/build.gradle
View file @
d9aff05a
...
...
@@ -33,8 +33,8 @@ android {
applicationId
"chat.rocket.android"
minSdkVersion
16
targetSdkVersion
25
versionCode
2
3
versionName
"1.0.1
3
"
versionCode
2
4
versionName
"1.0.1
4
"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
vectorDrawables
.
useSupportLibrary
=
true
...
...
app/src/main/java/chat/rocket/android/activity/AbstractAuthedActivity.java
View file @
d9aff05a
...
...
@@ -4,21 +4,21 @@ import android.content.Intent;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.disposables.CompositeDisposable
;
import
io.reactivex.schedulers.Schedulers
;
import
java.util.List
;
import
chat.rocket.android.LaunchUtil
;
import
chat.rocket.android.RocketChatCache
;
import
chat.rocket.android.helper.Logger
;
import
chat.rocket.persistence.realm.models.ddp.RealmRoom
;
import
chat.rocket.android.push.PushConstants
;
import
chat.rocket.android.push.PushNotificationHandler
;
import
chat.rocket.persistence.realm.RealmStore
;
import
chat.rocket.android.service.ConnectivityManager
;
import
chat.rocket.core.models.ServerInfo
;
import
chat.rocket.persistence.realm.RealmStore
;
import
chat.rocket.persistence.realm.models.ddp.RealmRoom
;
import
icepick.State
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.disposables.CompositeDisposable
;
import
io.reactivex.schedulers.Schedulers
;
abstract
class
AbstractAuthedActivity
extends
AbstractFragmentActivity
{
@State
protected
String
hostname
;
...
...
@@ -26,6 +26,7 @@ abstract class AbstractAuthedActivity extends AbstractFragmentActivity {
private
RocketChatCache
rocketChatCache
;
private
CompositeDisposable
compositeDisposable
=
new
CompositeDisposable
();
private
boolean
isNotification
;
@Override
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
...
...
@@ -61,6 +62,7 @@ abstract class AbstractAuthedActivity extends AbstractFragmentActivity {
}
if
(
intent
.
hasExtra
(
PushConstants
.
NOT_ID
))
{
isNotification
=
true
;
PushNotificationHandler
.
cleanUpNotificationStack
(
intent
.
getIntExtra
(
PushConstants
.
NOT_ID
,
0
));
}
...
...
@@ -155,6 +157,11 @@ abstract class AbstractAuthedActivity extends AbstractFragmentActivity {
subscribeToConfigChanges
();
ConnectivityManager
.
getInstance
(
getApplicationContext
()).
keepAliveServer
();
if
(
isNotification
)
{
updateHostnameIfNeeded
(
rocketChatCache
.
getSelectedServerHostname
());
updateRoomIdIfNeeded
(
rocketChatCache
.
getSelectedRoomId
());
isNotification
=
false
;
}
}
@Override
...
...
app/src/main/java/chat/rocket/android/activity/MainActivity.java
View file @
d9aff05a
...
...
@@ -52,8 +52,8 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
@Override
protected
void
onResume
()
{
super
.
onResume
();
if
(
presenter
!=
null
&&
presenter
instanceof
MainPresenter
)
{
((
MainPresenter
)
presenter
)
.
bindViewOnly
(
this
);
if
(
presenter
!=
null
)
{
presenter
.
bindViewOnly
(
this
);
}
}
...
...
app/src/main/java/chat/rocket/android/activity/MainContract.java
View file @
d9aff05a
...
...
@@ -28,5 +28,7 @@ public interface MainContract {
void
onOpenRoom
(
String
hostname
,
String
roomId
);
void
onRetryLogin
();
void
bindViewOnly
(
View
view
);
}
}
app/src/main/java/chat/rocket/android/activity/MainPresenter.java
View file @
d9aff05a
...
...
@@ -44,6 +44,7 @@ public class MainPresenter extends BasePresenter<MainContract.View>
this
.
rocketChatCache
=
rocketChatCache
;
}
@Override
public
void
bindViewOnly
(
@NonNull
MainContract
.
View
view
)
{
super
.
bindView
(
view
);
subscribeToUnreadCount
();
...
...
rocket-chat-android-widgets/src/main/res/layout/message_avatar.xml
View file @
d9aff05a
...
...
@@ -4,4 +4,5 @@
android:id=
"@+id/drawee_avatar"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
fresco:actualImageScaleType=
"fitCenter"
/>
\ No newline at end of file
fresco:actualImageScaleType=
"fitCenter"
fresco:roundedCornerRadius=
"5dp"
/>
\ No newline at end of file
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