hasCombined対応

This commit is contained in:
r-ca 2024-01-28 15:15:33 +09:00
parent 289f70c6cb
commit 8f0bdbb89a
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9
3 changed files with 4 additions and 3 deletions

View File

@ -2,5 +2,5 @@ package one.nem.lacerta.feature.library;
public interface DocumentSelectListener {
void onFolderSelected(String folderId, String folderName);
void onDocumentSelected(String documentId, String documentName);
void onDocumentSelected(String documentId, String documentName, boolean hasCombined);
}

View File

@ -164,11 +164,12 @@ public class LibraryPageFragment extends Fragment {
}
@Override
public void onDocumentSelected(String documentId, String documentName) {
public void onDocumentSelected(String documentId, String documentName, boolean hasCombined) {
Intent intent = new Intent(getContext(), ViewerMainActivity.class);
logger.debug("LibraryTopFragment", "Document selected! documentId: " + documentId + ", documentName: " + documentName);
intent.putExtra("documentId", documentId);
intent.putExtra("documentName", documentName);
intent.putExtra("hasCombined", hasCombined);
startActivity(intent);
}
});

View File

@ -45,7 +45,7 @@ public class ListItemAdapter extends RecyclerView.Adapter<ListItemAdapter.ListIt
holder.itemView.setOnClickListener( v -> {
if (listItem.getItemType() == ListItemType.ITEM_TYPE_DOCUMENT) {
listener.onDocumentSelected(listItem.getItemId(), listItem.getTitle());
listener.onDocumentSelected(listItem.getItemId(), listItem.getTitle(), listItem.getHasCombined());
}
else if (listItem.getItemType() == ListItemType.ITEM_TYPE_FOLDER) {
listener.onFolderSelected(listItem.getItemId(), listItem.getTitle());