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
1425fbc4
Commit
1425fbc4
authored
Oct 11, 2017
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add null check
parent
fafaf8b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
FileUploadProgressDialogFragment.java
...ent/chatroom/dialog/FileUploadProgressDialogFragment.java
+11
-9
No files found.
app/src/main/java/chat/rocket/android/fragment/chatroom/dialog/FileUploadProgressDialogFragment.java
View file @
1425fbc4
package
chat
.
rocket
.
android
.
fragment
.
chatroom
.
dialog
;
import
android.app.Dialog
;
import
android.content.DialogInterface
;
import
android.os.Bundle
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.Nullable
;
import
android.widget.ProgressBar
;
import
android.widget.TextView
;
import
android.widget.Toast
;
import
chat.rocket.android.R
;
import
chat.rocket.android.renderer.FileUploadingRenderer
;
import
chat.rocket.core.SyncState
;
import
chat.rocket.persistence.realm.models.internal.FileUploading
;
import
chat.rocket.persistence.realm.RealmObjectObserver
;
import
chat.rocket.
android.renderer.FileUploadingRenderer
;
import
chat.rocket.
persistence.realm.models.internal.FileUploading
;
/**
* dialog fragment to display progress of file uploading.
...
...
@@ -76,11 +75,14 @@ public class FileUploadProgressDialogFragment extends AbstractChatRoomDialogFrag
//TODO: prompt retry.
dismiss
();
}
else
{
new
FileUploadingRenderer
(
getContext
(),
state
)
.
progressInto
((
ProgressBar
)
getDialog
().
findViewById
(
R
.
id
.
progressBar
))
.
progressTextInto
(
(
TextView
)
getDialog
().
findViewById
(
R
.
id
.
txt_filesize_uploaded
),
(
TextView
)
getDialog
().
findViewById
(
R
.
id
.
txt_filesize_total
));
final
Dialog
dialog
=
getDialog
();
if
(
dialog
!=
null
)
{
new
FileUploadingRenderer
(
getContext
(),
state
)
.
progressInto
(
dialog
.
findViewById
(
R
.
id
.
progressBar
))
.
progressTextInto
(
dialog
.
findViewById
(
R
.
id
.
txt_filesize_uploaded
),
dialog
.
findViewById
(
R
.
id
.
txt_filesize_total
));
}
}
}
...
...
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