mirror of
https://github.com/leanote/leanote-android.git
synced 2026-01-13 07:03:54 +08:00
fix add notebook but title is empty
This commit is contained in:
@@ -35,6 +35,7 @@ import org.houxg.leamonax.model.User;
|
||||
import org.houxg.leamonax.service.AccountService;
|
||||
import org.houxg.leamonax.service.NotebookService;
|
||||
import org.houxg.leamonax.utils.DisplayUtils;
|
||||
import org.houxg.leamonax.utils.ToastUtils;
|
||||
import org.houxg.leamonax.widget.AlphabetDrawable;
|
||||
import org.houxg.leamonax.widget.TriangleView;
|
||||
|
||||
@@ -297,8 +298,13 @@ public class Navigation {
|
||||
.setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.dismiss();
|
||||
addNotebook(mEdit.getText().toString(), parentNotebookId);
|
||||
String newName = mEdit.getText().toString();
|
||||
if (TextUtils.isEmpty(newName)) {
|
||||
ToastUtils.show(mActivity, R.string.notebook_name_cant_be_empty);
|
||||
} else {
|
||||
dialog.dismiss();
|
||||
addNotebook(newName, parentNotebookId);
|
||||
}
|
||||
}
|
||||
})
|
||||
.show();
|
||||
|
||||
@@ -106,4 +106,5 @@
|
||||
<string name="leanote">蚂蚁笔记</string>
|
||||
<string name="conflict_occurs">糟糕,笔记冲突</string>
|
||||
<string name="host_example">登录接口地址将会是:\n%s/api/auth/login</string>
|
||||
<string name="notebook_name_cant_be_empty">笔记本名称不能为空</string>
|
||||
</resources>
|
||||
@@ -108,5 +108,6 @@
|
||||
<string name="generate_random_note">Generate random note</string>
|
||||
<string name="conflict_occurs">Oops! Conflicts occurs</string>
|
||||
<string name="host_example">For example, login api will be:\n%s/api/auth/login</string>
|
||||
<string name="notebook_name_cant_be_empty">Notebook\'s name can\'t be empty</string>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user