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
184abb0b
Commit
184abb0b
authored
Nov 11, 2017
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved all references of the demo server to open
parent
8779e638
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
73 deletions
+73
-73
ServerPolicyHelper.java
...n/java/chat/rocket/android/helper/ServerPolicyHelper.java
+1
-1
strings.xml
app/src/main/res/values/strings.xml
+1
-1
RocketChatCacheTest.kt
...rc/test/kotlin/chat.rocket.android/RocketChatCacheTest.kt
+2
-2
RestApiHelperTest.kt
.../kotlin/chat/rocket/android/api/rest/RestApiHelperTest.kt
+54
-54
UrlHelperTest.kt
...c/test/kotlin/chat/rocket/android/helper/UrlHelperTest.kt
+14
-14
server_row.xml
...t-chat-android-widgets/src/main/res/layout/server_row.xml
+1
-1
No files found.
app/src/main/java/chat/rocket/android/helper/ServerPolicyHelper.java
View file @
184abb0b
...
@@ -12,7 +12,7 @@ public class ServerPolicyHelper {
...
@@ -12,7 +12,7 @@ public class ServerPolicyHelper {
public
static
String
enforceHostname
(
String
hostname
)
{
public
static
String
enforceHostname
(
String
hostname
)
{
if
(
hostname
==
null
)
{
if
(
hostname
==
null
)
{
return
"
demo
.rocket.chat"
;
return
"
open
.rocket.chat"
;
}
}
return
removeTrailingSlash
(
removeProtocol
(
enforceDefaultHost
(
hostname
)));
return
removeTrailingSlash
(
removeProtocol
(
enforceDefaultHost
(
hostname
)));
...
...
app/src/main/res/values/strings.xml
View file @
184abb0b
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
<string
name=
"dialog_user_registration_password"
>
Password
</string>
<string
name=
"dialog_user_registration_password"
>
Password
</string>
<string
name=
"fragment_home_welcome_message"
>
Welcome to Rocket.Chat.Android\nSelect a channel from the drawer.
</string>
<string
name=
"fragment_home_welcome_message"
>
Welcome to Rocket.Chat.Android\nSelect a channel from the drawer.
</string>
<string
name=
"fragment_input_hostname_hostname"
>
Hostname
</string>
<string
name=
"fragment_input_hostname_hostname"
>
Hostname
</string>
<string
name=
"fragment_input_hostname_server_hint"
>
demo
.rocket.chat
</string>
<string
name=
"fragment_input_hostname_server_hint"
>
open
.rocket.chat
</string>
<string
name=
"fragment_input_hostname_connect"
>
CONNECT
</string>
<string
name=
"fragment_input_hostname_connect"
>
CONNECT
</string>
<string
name=
"fragment_login_username_or_email"
>
Username or email
</string>
<string
name=
"fragment_login_username_or_email"
>
Username or email
</string>
<string
name=
"fragment_login_password"
>
Password
</string>
<string
name=
"fragment_login_password"
>
Password
</string>
...
...
app/src/test/kotlin/chat.rocket.android/RocketChatCacheTest.kt
View file @
184abb0b
...
@@ -27,7 +27,7 @@ class RocketChatCacheTest {
...
@@ -27,7 +27,7 @@ class RocketChatCacheTest {
@Test
@Test
fun
getServerList_ShouldReturnHostnameList
()
{
fun
getServerList_ShouldReturnHostnameList
()
{
val
hostnameList
=
JSONObject
()
val
hostnameList
=
JSONObject
()
.
put
(
"http://
demo
.rocket.chat"
,
"images/logo/logo.png"
)
.
put
(
"http://
open
.rocket.chat"
,
"images/logo/logo.png"
)
.
put
(
"http://192.168.0.6:3000"
,
"images/icon.svg"
)
.
put
(
"http://192.168.0.6:3000"
,
"images/icon.svg"
)
.
toString
()
.
toString
()
...
@@ -35,7 +35,7 @@ class RocketChatCacheTest {
...
@@ -35,7 +35,7 @@ class RocketChatCacheTest {
val
expectedServerList
=
mutableListOf
(
val
expectedServerList
=
mutableListOf
(
Pair
(
"http://192.168.0.6:3000"
,
"http://192.168.0.6:3000/images/icon.svg"
),
Pair
(
"http://192.168.0.6:3000"
,
"http://192.168.0.6:3000/images/icon.svg"
),
Pair
(
"http://
demo.rocket.chat"
,
"http://demo
.rocket.chat/images/logo/logo.png"
))
Pair
(
"http://
open.rocket.chat"
,
"http://open
.rocket.chat/images/logo/logo.png"
))
val
serverList
=
cache
.
serverList
val
serverList
=
cache
.
serverList
assertThat
(
serverList
,
equalTo
(
expectedServerList
))
assertThat
(
serverList
,
equalTo
(
expectedServerList
))
}
}
...
...
app/src/test/kotlin/chat/rocket/android/api/rest/RestApiHelperTest.kt
View file @
184abb0b
This diff is collapsed.
Click to expand it.
app/src/test/kotlin/chat/rocket/android/helper/UrlHelperTest.kt
View file @
184abb0b
...
@@ -7,31 +7,31 @@ class UrlHelperTest {
...
@@ -7,31 +7,31 @@ class UrlHelperTest {
@Test
@Test
fun
removeUriSchemeTest
()
{
fun
removeUriSchemeTest
()
{
assertEquals
(
"
demo.rocket.chat"
,
UrlHelper
.
removeUriScheme
(
"https://demo
.rocket.chat"
))
assertEquals
(
"
open.rocket.chat"
,
UrlHelper
.
removeUriScheme
(
"https://open
.rocket.chat"
))
assertEquals
(
"
demo.rocket.chat"
,
UrlHelper
.
removeUriScheme
(
"http://demo
.rocket.chat"
))
assertEquals
(
"
open.rocket.chat"
,
UrlHelper
.
removeUriScheme
(
"http://open
.rocket.chat"
))
assertEquals
(
"
demo.rocket.chat"
,
UrlHelper
.
removeUriScheme
(
"demo
.rocket.chat"
))
assertEquals
(
"
open.rocket.chat"
,
UrlHelper
.
removeUriScheme
(
"open
.rocket.chat"
))
}
}
@Test
@Test
fun
getSafeHostnameTest
()
{
fun
getSafeHostnameTest
()
{
assertEquals
(
"https://
demo.rocket.chat"
,
UrlHelper
.
getSafeHostname
(
"https://demo
.rocket.chat"
))
assertEquals
(
"https://
open.rocket.chat"
,
UrlHelper
.
getSafeHostname
(
"https://open
.rocket.chat"
))
assertEquals
(
"https://
demo.rocket.chat"
,
UrlHelper
.
getSafeHostname
(
"http://demo
.rocket.chat"
))
assertEquals
(
"https://
open.rocket.chat"
,
UrlHelper
.
getSafeHostname
(
"http://open
.rocket.chat"
))
assertEquals
(
"https://
demo.rocket.chat"
,
UrlHelper
.
getSafeHostname
(
"demo
.rocket.chat"
))
assertEquals
(
"https://
open.rocket.chat"
,
UrlHelper
.
getSafeHostname
(
"open
.rocket.chat"
))
}
}
@Test
@Test
fun
getUrlTest
()
{
fun
getUrlTest
()
{
assertEquals
(
"https://
demo.rocket.chat/GENERAL/file.txt"
,
UrlHelper
.
getSafeUrl
(
"https://demo
.rocket.chat/GENERAL/file.txt"
))
assertEquals
(
"https://
open.rocket.chat/GENERAL/file.txt"
,
UrlHelper
.
getSafeUrl
(
"https://open
.rocket.chat/GENERAL/file.txt"
))
assertEquals
(
"http://
demo.rocket.chat/GENERAL/file.txt"
,
UrlHelper
.
getSafeUrl
(
"http://demo
.rocket.chat/GENERAL/file.txt"
))
assertEquals
(
"http://
open.rocket.chat/GENERAL/file.txt"
,
UrlHelper
.
getSafeUrl
(
"http://open
.rocket.chat/GENERAL/file.txt"
))
assertEquals
(
"
demo.rocket.chat/GENERAL/file.txt"
,
UrlHelper
.
getSafeUrl
(
"demo
.rocket.chat/GENERAL/file.txt"
))
assertEquals
(
"
open.rocket.chat/GENERAL/file.txt"
,
UrlHelper
.
getSafeUrl
(
"open
.rocket.chat/GENERAL/file.txt"
))
assertEquals
(
"
demo.rocket.chat/GENERAL/a%20sample%20file.txt"
,
UrlHelper
.
getSafeUrl
(
"demo
.rocket.chat/GENERAL/a sample file.txt"
))
assertEquals
(
"
open.rocket.chat/GENERAL/a%20sample%20file.txt"
,
UrlHelper
.
getSafeUrl
(
"open
.rocket.chat/GENERAL/a sample file.txt"
))
assertEquals
(
"
demo.rocket.chat/GENERAL/file.txt"
,
UrlHelper
.
getSafeUrl
(
"demo
.rocket.chat\\/GENERAL\\/file.txt"
))
assertEquals
(
"
open.rocket.chat/GENERAL/file.txt"
,
UrlHelper
.
getSafeUrl
(
"open
.rocket.chat\\/GENERAL\\/file.txt"
))
}
}
@Test
@Test
fun
getAttachmentLinkTest
()
{
fun
getAttachmentLinkTest
()
{
assertEquals
(
"https://
demo.rocket.chat/file-upload/aFileId/aFileName.txt"
,
UrlHelper
.
getAttachmentLink
(
"https://demo
.rocket.chat"
,
"aFileId"
,
"aFileName.txt"
))
assertEquals
(
"https://
open.rocket.chat/file-upload/aFileId/aFileName.txt"
,
UrlHelper
.
getAttachmentLink
(
"https://open
.rocket.chat"
,
"aFileId"
,
"aFileName.txt"
))
assertEquals
(
"https://
demo.rocket.chat/file-upload/aFileId/aFileName.txt"
,
UrlHelper
.
getAttachmentLink
(
"http://demo
.rocket.chat"
,
"aFileId"
,
"aFileName.txt"
))
assertEquals
(
"https://
open.rocket.chat/file-upload/aFileId/aFileName.txt"
,
UrlHelper
.
getAttachmentLink
(
"http://open
.rocket.chat"
,
"aFileId"
,
"aFileName.txt"
))
assertEquals
(
"https://
demo.rocket.chat/file-upload/aFileId/aFileName.txt"
,
UrlHelper
.
getAttachmentLink
(
"demo
.rocket.chat"
,
"aFileId"
,
"aFileName.txt"
))
assertEquals
(
"https://
open.rocket.chat/file-upload/aFileId/aFileName.txt"
,
UrlHelper
.
getAttachmentLink
(
"open
.rocket.chat"
,
"aFileId"
,
"aFileName.txt"
))
}
}
}
}
\ No newline at end of file
rocket-chat-android-widgets/src/main/res/layout/server_row.xml
View file @
184abb0b
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@+id/drawee_server_button"
app:layout_constraintStart_toEndOf=
"@+id/drawee_server_button"
app:layout_constraintTop_toBottomOf=
"@+id/text_view_site_name_label"
app:layout_constraintTop_toBottomOf=
"@+id/text_view_site_name_label"
tools:text=
"
demo
.rocket.chat"
/>
tools:text=
"
open
.rocket.chat"
/>
<ImageView
<ImageView
android:id=
"@+id/selected_server_dot"
android:id=
"@+id/selected_server_dot"
...
...
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