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
9065d45b
Commit
9065d45b
authored
Sep 22, 2017
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement removing a selected roomId from a specific server
parent
e893780a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
RocketChatCache.java
app/src/main/java/chat/rocket/android/RocketChatCache.java
+11
-0
MethodCallHelper.java
...c/main/java/chat/rocket/android/api/MethodCallHelper.java
+1
-0
No files found.
app/src/main/java/chat/rocket/android/RocketChatCache.java
View file @
9065d45b
...
@@ -189,4 +189,15 @@ public class RocketChatCache {
...
@@ -189,4 +189,15 @@ public class RocketChatCache {
getSharedPreferences
().
registerOnSharedPreferenceChangeListener
(
listener
);
getSharedPreferences
().
registerOnSharedPreferenceChangeListener
(
listener
);
},
BackpressureStrategy
.
LATEST
);
},
BackpressureStrategy
.
LATEST
);
}
}
public
void
removeSelectedRoomId
(
String
currentHostname
)
{
try
{
JSONObject
selectedRoomIdJsonObject
=
getSelectedRoomIdJsonObject
();
selectedRoomIdJsonObject
.
remove
(
currentHostname
);
setString
(
KEY_SELECTED_ROOM_ID
,
selectedRoomIdJsonObject
.
toString
());
}
catch
(
JSONException
e
)
{
Logger
.
report
(
e
);
RCLog
.
e
(
e
);
}
}
}
}
app/src/main/java/chat/rocket/android/api/MethodCallHelper.java
View file @
9065d45b
...
@@ -279,6 +279,7 @@ public class MethodCallHelper {
...
@@ -279,6 +279,7 @@ public class MethodCallHelper {
newHostname
=
serverList
.
get
(
0
).
getHostname
();
newHostname
=
serverList
.
get
(
0
).
getHostname
();
}
}
rocketChatCache
.
removeHostname
(
currentHostname
);
rocketChatCache
.
removeHostname
(
currentHostname
);
rocketChatCache
.
removeSelectedRoomId
(
currentHostname
);
rocketChatCache
.
setSelectedServerHostname
(
newHostname
);
rocketChatCache
.
setSelectedServerHostname
(
newHostname
);
return
null
;
return
null
;
});
});
...
...
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