Skip to content
This repository was archived by the owner on Jul 25, 2024. It is now read-only.

Commit 60e4cb5

Browse files
Sam1301kunall17
authored andcommitted
Add documentation.
1 parent ee90be6 commit 60e4cb5

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

app/src/main/java/com/zulip/android/activities/ZulipActivity.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -942,9 +942,6 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
942942
// activity transition animation
943943
ActivityTransitionAnim.transition(ZulipActivity.this);
944944
}
945-
946-
// TODO: rearrange code
947-
// in else if upload file sent and show notification for it
948945
else if (requestCode == REQUEST_PICK_FILE && resultCode == RESULT_OK) {
949946
List<Uri> fileUris = new ArrayList<>();
950947
if (data.getData() != null) {
@@ -1135,7 +1132,8 @@ public void onProgressUpdate(int percentage, String progress, int notificationId
11351132
private NotificationCompat.Builder mBuilder;
11361133

11371134
/**
1138-
* TODO: add description
1135+
* Modifies notification {@link Notifications} of specifies {@param notificationId}
1136+
* and sets its {@param content}.
11391137
*
11401138
* @param notificationId
11411139
* @param content
@@ -1158,7 +1156,8 @@ private void setNotification(int notificationId, String content) {
11581156
}
11591157

11601158
/**
1161-
* TODO: add description
1159+
* Updates upload notification with passed percentage {@param percentage} and progress string
1160+
* {@param progress} as content.
11621161
*
11631162
* @param notificationId
11641163
* @param percentage
@@ -1174,7 +1173,7 @@ private void progressNotification(int notificationId, int percentage, String pro
11741173
}
11751174

11761175
/**
1177-
* TODO: add description
1176+
* Shows success notification.
11781177
*
11791178
* @param notificationId
11801179
* @param content

app/src/main/java/com/zulip/android/networking/UploadProgressRequest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
import okio.BufferedSink;
1313

1414
/**
15-
* TODO: add description
15+
* Decorated retrofit RequestBody to intercept progress during network call.
16+
* Implement UploadCallbacks interface {@link UploadCallbacks} to receive progress update.
1617
*/
1718

1819
public class UploadProgressRequest extends RequestBody {

app/src/main/java/com/zulip/android/util/ListDialog.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
import com.zulip.android.R;
1313

1414
/**
15-
* TODO: add description
15+
* List dialog for picking option of upload (camera or file).
16+
*
17+
* The activity that creates an instance of this dialog fragment must
18+
* implement ListDialogListener interface {@link ListDialogListener} in order to receive event callbacks.
19+
* Each method passes the DialogFragment in case the host needs to query it.
1620
*/
1721

1822
public class ListDialog extends DialogFragment {
1923

20-
/* The activity that creates an instance of this dialog fragment must
21-
* implement this interface in order to receive event callbacks.
22-
* Each method passes the DialogFragment in case the host needs to query it. */
2324
public interface ListDialogListener {
2425
void onDialogPhotoClick(DialogFragment dialog);
2526
void onDialogFileClick(DialogFragment dialog);

0 commit comments

Comments
 (0)