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
81ef4d99
Commit
81ef4d99
authored
Aug 25, 2017
by
Lucio Maciel
Committed by
GitHub
Aug 25, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #411 from RocketChat/fix/composer-crashing
Fix message composer crashes
parents
1aaf8924
ea31aeef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
AutocompleteManager.java
...roid/widget/message/autocomplete/AutocompleteManager.java
+3
-0
AutocompleteSource.java
...droid/widget/message/autocomplete/AutocompleteSource.java
+1
-1
UserSource.java
.../android/widget/message/autocomplete/user/UserSource.java
+1
-1
No files found.
rocket-chat-android-widgets/src/main/java/chat/rocket/android/widget/message/autocomplete/AutocompleteManager.java
View file @
81ef4d99
...
...
@@ -220,6 +220,9 @@ public class AutocompleteManager {
}
private
void
replaceSelected
(
String
autocompleteSuggestion
)
{
if
(
text
==
null
)
{
return
;
}
final
String
preText
=
text
.
substring
(
0
,
fromIndex
);
final
String
postText
=
text
.
substring
(
toIndex
);
...
...
rocket-chat-android-widgets/src/main/java/chat/rocket/android/widget/message/autocomplete/AutocompleteSource.java
View file @
81ef4d99
...
...
@@ -12,7 +12,7 @@ public abstract class AutocompleteSource<A extends AutocompleteAdapter, I extend
new
AutocompleteViewHolder
.
OnClickListener
<
I
>()
{
@Override
public
void
onClick
(
I
autocompleteItem
)
{
if
(
autocompleteSelected
!=
null
)
{
if
(
autocompleteSelected
!=
null
&&
autocompleteItem
!=
null
)
{
autocompleteSelected
.
onSelected
(
getAutocompleteSuggestion
(
autocompleteItem
));
}
}
...
...
rocket-chat-android-widgets/src/main/java/chat/rocket/android/widget/message/autocomplete/user/UserSource.java
View file @
81ef4d99
...
...
@@ -99,7 +99,7 @@ public class UserSource extends AutocompleteSource<UserAdapter, UserItem> {
@Override
protected
String
getAutocompleteSuggestion
(
UserItem
autocompleteItem
)
{
return
getTrigger
()
+
autocompleteItem
.
getSuggestion
(
);
return
getTrigger
()
+
(
autocompleteItem
==
null
?
""
:
autocompleteItem
.
getSuggestion
()
);
}
private
List
<
UserItem
>
toUserItemList
(
List
<
SpotlightUser
>
users
)
{
...
...
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