mirror of
https://codeberg.org/gitnex/GitNex.git
synced 2024-12-16 15:48:13 +08:00
Fix edit comment draft (#661)
Fix edit comment draft Co-authored-by: M M Arif <mmarif@swatian.com> Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/661
This commit is contained in:
parent
28a23d30f8
commit
00eb9c9135
@ -104,7 +104,12 @@ public class ReplyToIssueActivity extends BaseActivity {
|
||||
}
|
||||
else {
|
||||
|
||||
draftIdOnCreate = returnDraftId();
|
||||
if(getIntent().getStringExtra("commentBody") != null) {
|
||||
draftIdOnCreate = returnDraftId(getIntent().getStringExtra("commentBody"));
|
||||
}
|
||||
else {
|
||||
draftIdOnCreate = returnDraftId("");
|
||||
}
|
||||
}
|
||||
|
||||
replyButton = findViewById(R.id.replyButton);
|
||||
@ -216,7 +221,7 @@ public class ReplyToIssueActivity extends BaseActivity {
|
||||
|
||||
}
|
||||
|
||||
private long returnDraftId() {
|
||||
private long returnDraftId(String draftText) {
|
||||
|
||||
TinyDB tinyDb = new TinyDB(getApplicationContext());
|
||||
|
||||
@ -226,7 +231,7 @@ public class ReplyToIssueActivity extends BaseActivity {
|
||||
|
||||
DraftsApi draftsApi = new DraftsApi(appCtx);
|
||||
|
||||
return draftsApi.insertDraft(repositoryId, currentActiveAccountId, issueNumber, "", StaticGlobalVariables.draftTypeComment, "");
|
||||
return draftsApi.insertDraft(repositoryId, currentActiveAccountId, issueNumber, draftText, StaticGlobalVariables.draftTypeComment, "");
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user