mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
結合アクションを実装
This commit is contained in:
parent
8e1127586d
commit
79beb8f87f
|
@ -24,6 +24,8 @@ import one.nem.lacerta.component.common.LacertaSelectDirDialogListener;
|
|||
import one.nem.lacerta.component.common.LacertaSelectRevDialog;
|
||||
import one.nem.lacerta.component.common.LacertaSelectRevDialogListener;
|
||||
import one.nem.lacerta.component.common.picker.LacertaDirPickerDialog;
|
||||
import one.nem.lacerta.component.common.picker.LacertaFilePickerAdapter;
|
||||
import one.nem.lacerta.component.common.picker.LacertaFilePickerDialog;
|
||||
import one.nem.lacerta.data.Document;
|
||||
import one.nem.lacerta.data.LacertaLibrary;
|
||||
import one.nem.lacerta.model.ListItemType;
|
||||
|
@ -256,6 +258,21 @@ public class ViewerListFragment extends Fragment {
|
|||
.setNegativeButtonText("キャンセル");
|
||||
lacertaDirPickerDialog.show(getParentFragmentManager(), "select_dir_dialog");
|
||||
return true;
|
||||
} else if(item.getItemId() == R.id.action_combine) {
|
||||
LacertaFilePickerDialog lacertaFilePickerDialog = new LacertaFilePickerDialog();
|
||||
lacertaFilePickerDialog.setListener((name, fileId) -> {
|
||||
lacertaLibrary.combineDocument(documentId, fileId).thenAccept(aVoid -> {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
// Stop Activity
|
||||
getActivity().finish(); // TODO-rca: 終了せずにUIを更新したい
|
||||
});
|
||||
});
|
||||
});
|
||||
lacertaFilePickerDialog.setTitle("ファイルの結合")
|
||||
.setMessage("結合するファイルを選択してください。")
|
||||
.setNegativeButtonText("キャンセル");
|
||||
lacertaFilePickerDialog.show(getParentFragmentManager(), "select_file_dialog");
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user