Merge pull request #99 from lacerta-doc/submit1

提出用訂正いろいろ
This commit is contained in:
ろむねこ 2024-01-23 05:13:12 +09:00 committed by GitHub
commit e69d489a96
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
30 changed files with 508 additions and 102 deletions

View File

@ -82,4 +82,6 @@ dependencies {
implementation project(':model') implementation project(':model')
implementation project(':utils') implementation project(':utils')
implementation project(':component:scanner')
} }

View File

@ -10,6 +10,7 @@ import androidx.navigation.NavController;
import androidx.navigation.fragment.NavHostFragment; import androidx.navigation.fragment.NavHostFragment;
import androidx.navigation.ui.NavigationUI; import androidx.navigation.ui.NavigationUI;
import android.content.Intent;
import android.graphics.Color; import android.graphics.Color;
import android.os.Bundle; import android.os.Bundle;
import android.util.Log; import android.util.Log;
@ -17,12 +18,14 @@ import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.widget.Toast; import android.widget.Toast;
import one.nem.lacerta.component.scanner.ScannerManagerActivity;
import one.nem.lacerta.model.FragmentNavigation; import one.nem.lacerta.model.FragmentNavigation;
import one.nem.lacerta.model.pref.FeatureSwitchOverride; import one.nem.lacerta.model.pref.FeatureSwitchOverride;
import one.nem.lacerta.utils.FeatureSwitch; import one.nem.lacerta.utils.FeatureSwitch;
import com.google.android.material.appbar.AppBarLayout; import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.bottomnavigation.BottomNavigationView; import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import java.io.NotActiveException; import java.io.NotActiveException;
@ -74,6 +77,13 @@ public class MainActivity extends AppCompatActivity implements FragmentNavigatio
// Set status bar color // Set status bar color
getWindow().setStatusBarColor(ContextCompat.getColor(this, one.nem.lacerta.shared.ui.R.color.colorSurface)); getWindow().setStatusBarColor(ContextCompat.getColor(this, one.nem.lacerta.shared.ui.R.color.colorSurface));
// Fab
findViewById(R.id.scanFab).setOnClickListener(v -> {
Toast.makeText(this, "Scan", Toast.LENGTH_SHORT).show();
Intent intent = new Intent(this.getApplicationContext(), ScannerManagerActivity.class);
startActivity(intent);
});
} }
private void initializeApp() { private void initializeApp() {
Log.d("Init", "Initializing app"); Log.d("Init", "Initializing app");

View File

@ -34,4 +34,17 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:menu="@menu/bottom_nav_menu" /> app:menu="@menu/bottom_nav_menu" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/scanFab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="32dp"
android:layout_marginBottom="32dp"
android:clickable="true"
app:layout_constraintBottom_toTopOf="@+id/bottom_nav"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/ic_baseline_add_24" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -3,16 +3,13 @@ package one.nem.lacerta.component.scanner;
import android.app.ProgressDialog; import android.app.ProgressDialog;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.BitmapFactory; import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle; import android.os.Bundle;
import android.util.Log;
import android.view.View; import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.Toast; import android.widget.Toast;
import androidx.activity.EdgeToEdge; import androidx.activity.EdgeToEdge;
import androidx.annotation.AnimatorRes;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets; import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat; import androidx.core.view.ViewCompat;
@ -28,11 +25,11 @@ import java.util.concurrent.CompletableFuture;
import javax.inject.Inject; import javax.inject.Inject;
import dagger.hilt.android.AndroidEntryPoint; import dagger.hilt.android.AndroidEntryPoint;
import one.nem.lacerta.data.Document;
import one.nem.lacerta.model.document.DocumentDetail; import one.nem.lacerta.model.document.DocumentDetail;
import one.nem.lacerta.model.document.DocumentMeta; import one.nem.lacerta.model.document.DocumentMeta;
import one.nem.lacerta.processor.factory.DocumentProcessorFactory; import one.nem.lacerta.processor.factory.DocumentProcessorFactory;
import one.nem.lacerta.utils.LacertaLogger; import one.nem.lacerta.utils.LacertaLogger;
import one.nem.lacerta.data.Document;
import one.nem.lacerta.vcs.factory.LacertaVcsFactory; import one.nem.lacerta.vcs.factory.LacertaVcsFactory;
@AndroidEntryPoint @AndroidEntryPoint
@ -121,7 +118,7 @@ public class ScannerManagerActivity extends AppCompatActivity {
return true; return true;
} else if (item.getItemId() == R.id.action_insert_exist) { } else if (item.getItemId() == R.id.action_insert_exist) {
// 既存ドキュメントに挿入 // 既存ドキュメントに挿入
Toast.makeText(this, "挿入処理", Toast.LENGTH_SHORT).show(); Toast.makeText(this, "Work in progress", Toast.LENGTH_SHORT).show();
insertToExistDocument(); insertToExistDocument();
return true; return true;
} else if (item.getItemId() == android.R.id.home) { } else if (item.getItemId() == android.R.id.home) {
@ -139,7 +136,6 @@ public class ScannerManagerActivity extends AppCompatActivity {
if (this.croppedImages.isEmpty()) { if (this.croppedImages.isEmpty()) {
logger.debug(TAG, "this.resultImages is empty"); logger.debug(TAG, "this.resultImages is empty");
logger.e_code("7cb0584e-74ef-48ec-848a-c4d14e75e15a"); logger.e_code("7cb0584e-74ef-48ec-848a-c4d14e75e15a");
// TODO-rca: なんかする
} else { } else {
logger.debug(TAG, "this.resultImages is not empty"); logger.debug(TAG, "this.resultImages is not empty");
updateResultView(this.croppedImages); updateResultView(this.croppedImages);

View File

@ -1,5 +1,6 @@
package one.nem.lacerta.component.viewer; package one.nem.lacerta.component.viewer;
import android.app.AlertDialog;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.os.Bundle; import android.os.Bundle;
@ -23,6 +24,7 @@ import dagger.hilt.android.AndroidEntryPoint;
import one.nem.lacerta.data.Document; import one.nem.lacerta.data.Document;
import one.nem.lacerta.model.document.DocumentDetail; import one.nem.lacerta.model.document.DocumentDetail;
import one.nem.lacerta.model.document.page.Page; import one.nem.lacerta.model.document.page.Page;
import one.nem.lacerta.utils.FeatureSwitch;
import one.nem.lacerta.utils.LacertaLogger; import one.nem.lacerta.utils.LacertaLogger;
/** /**
@ -42,15 +44,17 @@ public class ComponentViewerTopFragment extends Fragment {
private static final String TAG = "ComponentViewerTopFragment"; private static final String TAG = "ComponentViewerTopFragment";
private String documentId; private String documentId;
private String documentName;
public ComponentViewerTopFragment() { public ComponentViewerTopFragment() {
// Required empty public constructor // Required empty public constructor
} }
public static ComponentViewerTopFragment newInstance(String documentId) { public static ComponentViewerTopFragment newInstance(String documentId, String documentName) {
ComponentViewerTopFragment fragment = new ComponentViewerTopFragment(); ComponentViewerTopFragment fragment = new ComponentViewerTopFragment();
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putString("documentId", documentId); args.putString("documentId", documentId);
args.putString("documentName", documentName);
fragment.setArguments(args); fragment.setArguments(args);
return fragment; return fragment;
} }
@ -60,6 +64,7 @@ public class ComponentViewerTopFragment extends Fragment {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
if (getArguments() != null) { if (getArguments() != null) {
documentId = getArguments().getString("documentId"); documentId = getArguments().getString("documentId");
documentName = getArguments().getString("documentName");
} }
} }
@ -71,7 +76,7 @@ public class ComponentViewerTopFragment extends Fragment {
// Toolbar // Toolbar
Toolbar toolbar = view.findViewById(R.id.toolbar); Toolbar toolbar = view.findViewById(R.id.toolbar);
toolbarSetup(toolbar, true, "Revision List"); toolbarSetup(toolbar, true, this.documentName == null ? "Document" : this.documentName);
RecyclerView recyclerView = view.findViewById(R.id.body_recycler_view); RecyclerView recyclerView = view.findViewById(R.id.body_recycler_view);
recyclerView.setLayoutManager(new LinearLayoutManager(getContext())); recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
@ -80,12 +85,14 @@ public class ComponentViewerTopFragment extends Fragment {
}); });
recyclerView.setAdapter(viewerBodyAdapter); recyclerView.setAdapter(viewerBodyAdapter);
if (FeatureSwitch.Viewer.showProgressBarWhenLoading) view.findViewById(R.id.loading_progress_bar).setVisibility(View.VISIBLE);
document.getDocument(documentId).thenAccept(documentDetail -> { document.getDocument(documentId).thenAccept(documentDetail -> {
ArrayList<Page> pages = documentDetail.getPages(); ArrayList<Page> pages = documentDetail.getPages();
logger.debug(TAG, "pages.size(): " + pages.size()); logger.debug(TAG, "pages.size(): " + pages.size());
viewerBodyAdapter.setPages(pages); viewerBodyAdapter.setPages(pages);
getActivity().runOnUiThread(() -> { getActivity().runOnUiThread(() -> {
viewerBodyAdapter.notifyItemRangeChanged(0, pages.size()); viewerBodyAdapter.notifyItemRangeChanged(0, pages.size());
if (FeatureSwitch.Viewer.showProgressBarWhenLoading) view.findViewById(R.id.loading_progress_bar).setVisibility(View.GONE);
}); });
}); });
@ -104,9 +111,8 @@ public class ComponentViewerTopFragment extends Fragment {
if (showBackButton) { if (showBackButton) {
toolbar.setNavigationIcon(one.nem.lacerta.shared.ui.R.drawable.arrow_back_24px); toolbar.setNavigationIcon(one.nem.lacerta.shared.ui.R.drawable.arrow_back_24px);
toolbar.setNavigationOnClickListener(v -> { toolbar.setNavigationOnClickListener(v -> {
//this.libraryItemPage = lacertaLibrary.getLibraryPage(this.libraryItemPage.getParentId(), 10).join(); // Stop Activity
// Back getActivity().finish();
Navigation.findNavController(requireView()).popBackStack();
}); });
} else { } else {
toolbar.setNavigationIcon(null); toolbar.setNavigationIcon(null);
@ -120,6 +126,49 @@ public class ComponentViewerTopFragment extends Fragment {
.replace(R.id.nav_host_fragment, ViewerVcsRevListFragment.newInstance(documentId)) .replace(R.id.nav_host_fragment, ViewerVcsRevListFragment.newInstance(documentId))
.commit(); .commit();
return true; return true;
} else if (item.getItemId() == R.id.action_rename) {
// TODO-rca: デザインをMaterial Design 3に合わせたカスタムダイアログにする
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
builder.setTitle("ファイル名の変更");
builder.setMessage("ファイル名を入力してください");
final android.widget.EditText input = new android.widget.EditText(getContext());
input.setText(documentName);
builder.setView(input);
builder.setPositiveButton("作成", (dialog, which) -> {
document.renameDocument(documentId, input.getText().toString()).thenAccept(aVoid -> {
getActivity().runOnUiThread(() -> {
toolbar.setTitle(input.getText().toString());
documentName = input.getText().toString();
});
});
});
builder.setNegativeButton("キャンセル", (dialog, which) -> {
dialog.cancel();
});
builder.show();
return true;
} else if (item.getItemId() == R.id.action_delete) {
// TODO-rca: デザインをMaterial Design 3に合わせたカスタムダイアログにする
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
builder.setTitle("ファイルの削除");
builder.setMessage("ファイルを削除しますか?");
builder.setPositiveButton("削除", (dialog, which) -> {
document.deleteDocument(documentId).thenAccept(aVoid -> {
getActivity().runOnUiThread(() -> {
// Stop Activity
getActivity().finish();
});
});
});
builder.setNegativeButton("キャンセル", (dialog, which) -> {
dialog.cancel();
});
builder.show();
return true;
} else if (item.getItemId() == R.id.action_move) {
Toast.makeText(getContext(), "Work in progress", Toast.LENGTH_SHORT).show();
return true;
} else { } else {
return false; return false;
} }

View File

@ -35,6 +35,7 @@ public class ViewerMainActivity extends AppCompatActivity {
// Variables // Variables
private static final String TAG = "ViewerMainActivity"; private static final String TAG = "ViewerMainActivity";
String documentId; String documentId;
String documentName;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
@ -50,6 +51,7 @@ public class ViewerMainActivity extends AppCompatActivity {
Intent intent = getIntent(); Intent intent = getIntent();
try { try {
documentId = intent.getStringExtra("documentId"); documentId = intent.getStringExtra("documentId");
documentName = intent.getStringExtra("documentName");
} }
catch (Exception e) { catch (Exception e) {
logger.error(TAG, "Failed to get documentId from intent"); logger.error(TAG, "Failed to get documentId from intent");
@ -60,7 +62,7 @@ public class ViewerMainActivity extends AppCompatActivity {
// Navigation // Navigation
getSupportFragmentManager().beginTransaction() getSupportFragmentManager().beginTransaction()
.replace(R.id.nav_host_fragment, ComponentViewerTopFragment.newInstance(documentId)) .replace(R.id.nav_host_fragment, ComponentViewerTopFragment.newInstance(documentId, documentName))
.commit(); .commit();
} }
} }

View File

@ -37,6 +37,16 @@
</com.google.android.material.appbar.CollapsingToolbarLayout> </com.google.android.material.appbar.CollapsingToolbarLayout>
<ProgressBar
android:id="@+id/loading_progress_bar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:indeterminate="true"
android:background="@color/colorSurface"
android:visibility="gone" />
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView

View File

@ -4,4 +4,16 @@
android:id="@+id/action_open_vcs_rev_list" android:id="@+id/action_open_vcs_rev_list"
android:title="Open VCS Rev List" /> android:title="Open VCS Rev List" />
<item
android:id="@+id/action_rename"
android:title="リネーム" />
<item
android:id="@+id/action_delete"
android:title="削除" />
<item
android:id="@+id/action_move"
android:title="移動" />
</menu> </menu>

View File

@ -18,6 +18,8 @@ public interface Document {
CompletableFuture<DocumentDetail> createDocument(); CompletableFuture<DocumentDetail> createDocument();
CompletableFuture<Void> renameDocument(String documentId, String name);
CompletableFuture<Void> deleteDocument(String documentId); CompletableFuture<Void> deleteDocument(String documentId);
CompletableFuture<Void> updateDocument(DocumentDetail detail); CompletableFuture<Void> updateDocument(DocumentDetail detail);

View File

@ -1,5 +1,7 @@
package one.nem.lacerta.data.impl; package one.nem.lacerta.data.impl;
import androidx.room.Update;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
@ -112,6 +114,11 @@ public class DocumentImpl implements Document {
@Override @Override
public CompletableFuture<Void> deleteDocument(String documentId) { public CompletableFuture<Void> deleteDocument(String documentId) {
return CompletableFuture.supplyAsync(() -> { return CompletableFuture.supplyAsync(() -> {
DocumentEntity documentEntity = database.documentDao().findById(documentId);
if (documentEntity == null) {
throw new IllegalArgumentException("documentId is not found");
}
database.documentDao().delete(documentEntity);
return null; return null;
}); });
} }
@ -124,6 +131,19 @@ public class DocumentImpl implements Document {
}); });
} }
@Override
public CompletableFuture<Void> renameDocument(String documentId, String name) {
return CompletableFuture.supplyAsync(() -> {
DocumentEntity documentEntity = database.documentDao().findById(documentId);
if (documentEntity == null) {
throw new IllegalArgumentException("documentId is not found");
}
documentEntity.title = name;
database.documentDao().update(documentEntity);
return null;
});
}
@Override @Override
public CompletableFuture<DocumentDetail> getDocument(String documentId) { public CompletableFuture<DocumentDetail> getDocument(String documentId) {
return CompletableFuture.supplyAsync(() -> { return CompletableFuture.supplyAsync(() -> {

View File

@ -1,6 +1,7 @@
package one.nem.lacerta.data.impl; package one.nem.lacerta.data.impl;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
@ -38,13 +39,6 @@ public class LacertaLibraryImpl implements LacertaLibrary {
@Override @Override
public CompletableFuture<ArrayList<ListItem>> getRecentDocument(int limit) { public CompletableFuture<ArrayList<ListItem>> getRecentDocument(int limit) {
return CompletableFuture.supplyAsync(() -> { return CompletableFuture.supplyAsync(() -> {
// 5秒フリーズさせる
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
List<DocumentEntity> documentEntities = database.documentDao().getRecentDocument(limit); List<DocumentEntity> documentEntities = database.documentDao().getRecentDocument(limit);
ArrayList<ListItem> listItems = new ArrayList<>(); ArrayList<ListItem> listItems = new ArrayList<>();
@ -106,12 +100,14 @@ public class LacertaLibraryImpl implements LacertaLibrary {
listItems.add(listItem); listItems.add(listItem);
} }
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:");
for (DocumentEntity documentEntity : documentEntities) { for (DocumentEntity documentEntity : documentEntities) {
logger.debug("LacertaLibraryImpl", "documentEntity.title: " + documentEntity.title); logger.debug("LacertaLibraryImpl", "documentEntity.title: " + documentEntity.title);
ListItem listItem = new ListItem(); ListItem listItem = new ListItem();
listItem.setItemType(ListItemType.ITEM_TYPE_DOCUMENT); listItem.setItemType(ListItemType.ITEM_TYPE_DOCUMENT);
listItem.setTitle(documentEntity.title); listItem.setTitle(documentEntity.title);
// listItem.setDescription(DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm").format(documentEntity.updatedAt.toInstant())); listItem.setDescription(simpleDateFormat.format(documentEntity.updatedAt));
listItem.setItemId(documentEntity.id); listItem.setItemId(documentEntity.id);
listItems.add(listItem); listItems.add(listItem);
} }

View File

@ -1,5 +1,5 @@
package one.nem.lacerta.feature.home; package one.nem.lacerta.feature.home;
public interface DocumentSelectListener { public interface DocumentSelectListener {
void onDocumentSelect(String documentId); void onDocumentSelect(String documentId, String documentName);
} }

View File

@ -4,38 +4,21 @@ import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.util.Log; import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar; import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.navigation.Navigation;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.appbar.CollapsingToolbarLayout;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import javax.inject.Inject; import javax.inject.Inject;
import dagger.hilt.android.AndroidEntryPoint; import dagger.hilt.android.AndroidEntryPoint;
import one.nem.lacerta.component.viewer.ViewerMainActivity; import one.nem.lacerta.component.viewer.ViewerMainActivity;
import one.nem.lacerta.data.Document;
import one.nem.lacerta.data.LacertaLibrary; import one.nem.lacerta.data.LacertaLibrary;
import one.nem.lacerta.model.ListItem; import one.nem.lacerta.utils.FeatureSwitch;
import one.nem.lacerta.model.document.DocumentMeta;
/** /**
@ -49,6 +32,8 @@ public class HomeTopFragment extends Fragment {
@Inject @Inject
LacertaLibrary lacertaLibrary; LacertaLibrary lacertaLibrary;
private ListItemAdapter listItemAdapter;
public HomeTopFragment() { public HomeTopFragment() {
// Required empty public constructor // Required empty public constructor
} }
@ -71,7 +56,6 @@ public class HomeTopFragment extends Fragment {
// Inflate the layout for this fragment // Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_home_top, container, false); View view = inflater.inflate(R.layout.fragment_home_top, container, false);
setHasOptionsMenu(true);
return view; return view;
} }
@ -81,28 +65,71 @@ public class HomeTopFragment extends Fragment {
RecyclerView recyclerView = view.findViewById(R.id.home_item_recycler_view); RecyclerView recyclerView = view.findViewById(R.id.home_item_recycler_view);
Toolbar toolbar = view.findViewById(R.id.home_toolbar);
toolbarSetup(toolbar, false, "ホーム");
ListItemAdapter listItemAdapter = new ListItemAdapter(documentId -> { this.listItemAdapter = new ListItemAdapter(new DocumentSelectListener() {
Log.d("HomeTopFragment", "onViewCreated: " + documentId); @Override
public void onDocumentSelect(String documentId, String documentName) {
Intent intent = new Intent(getContext(), ViewerMainActivity.class); Intent intent = new Intent(getContext(), ViewerMainActivity.class);
Log.d("HomeTopFragment", "onDocumentSelect: " + documentId + " " + documentName);
intent.putExtra("documentId", documentId); intent.putExtra("documentId", documentId);
intent.putExtra("documentName", documentName);
startActivity(intent); startActivity(intent);
}
}); });
recyclerView.setAdapter(listItemAdapter); recyclerView.setAdapter(listItemAdapter);
recyclerView.setLayoutManager(new LinearLayoutManager(getContext())); recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
updateList();
}
@Override
public void onResume() {
super.onResume();
updateList();
}
private void updateList() {
lacertaLibrary.getRecentDocument(10).thenAccept(listItems -> { lacertaLibrary.getRecentDocument(10).thenAccept(listItems -> {
listItemAdapter.setListItems(listItems); if (listItems == null) {
return;
}
this.listItemAdapter.setListItems(listItems);
getActivity().runOnUiThread(() -> { getActivity().runOnUiThread(() -> {
listItemAdapter.notifyItemRangeInserted(0, listItems.size()); Log.d("HomeTopFragment", "onViewCreated: " + listItems.size());
if (FeatureSwitch.RecyclerView.useSimpleNotifyMethod) {
this.listItemAdapter.notifyDataSetChanged();
} else {
// IndexOutOfBoundsExceptionを吐くことがあったので いったん
this.listItemAdapter.notifyItemRangeInserted(0, listItems.size() - 1);
}
}); });
}); });
} }
@Override /**
public void onCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater inflater) { * ToolbarをInitする
inflater.inflate(R.menu.drawer_menu, menu); *
super.onCreateOptionsMenu(menu, inflater); * @param toolbar Toolbar
* @param showBackButton 戻るボタンを表示するか
* @param title タイトル
*/
private void toolbarSetup(Toolbar toolbar, boolean showBackButton, String title) {
getActivity().runOnUiThread(() -> {
if (showBackButton) {
toolbar.setNavigationIcon(one.nem.lacerta.shared.ui.R.drawable.arrow_back_24px);
toolbar.setNavigationOnClickListener(v -> {
//this.libraryItemPage = lacertaLibrary.getLibraryPage(this.libraryItemPage.getParentId(), 10).join();
// Back
Navigation.findNavController(requireView()).popBackStack();
});
} else {
toolbar.setNavigationIcon(null);
}
toolbar.setTitle(title);
});
} }
} }

View File

@ -46,16 +46,18 @@ public class ListItemAdapter extends RecyclerView.Adapter<ListItemAdapter.ListIt
holder.description.setText(listItem.getDescription()); holder.description.setText(listItem.getDescription());
holder.itemView.setOnClickListener( v -> { holder.itemView.setOnClickListener( v -> {
Intent intent = new Intent(v.getContext(), ViewerMainActivity.class); listener.onDocumentSelect(listItem.getItemId(), listItem.getTitle());
intent.putExtra("documentId", listItem.getItemId());
v.getContext().startActivity(intent);
}); });
} }
@Override @Override
public int getItemCount() { public int getItemCount() {
if (listItems == null) {
return 0;
} else {
return listItems.size(); return listItems.size();
} }
}
public static class ListItemViewHolder extends RecyclerView.ViewHolder{ public static class ListItemViewHolder extends RecyclerView.ViewHolder{

View File

@ -29,7 +29,7 @@
app:layout_scrollFlags="scroll|exitUntilCollapsed"> app:layout_scrollFlags="scroll|exitUntilCollapsed">
<androidx.appcompat.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/home_toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin" app:layout_collapseMode="pin"

View File

@ -1,5 +1,9 @@
package one.nem.lacerta.feature.library; package one.nem.lacerta.feature.library;
/*
Currently, this file is not used in the app.
*/
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;

View File

@ -40,6 +40,7 @@ import one.nem.lacerta.data.LacertaLibrary;
import one.nem.lacerta.model.FragmentNavigation; import one.nem.lacerta.model.FragmentNavigation;
import one.nem.lacerta.model.LibraryItemPage; import one.nem.lacerta.model.LibraryItemPage;
import one.nem.lacerta.model.PublicPath; import one.nem.lacerta.model.PublicPath;
import one.nem.lacerta.utils.FeatureSwitch;
import one.nem.lacerta.utils.LacertaLogger; import one.nem.lacerta.utils.LacertaLogger;
@ -199,12 +200,18 @@ public class LibraryPageFragment extends Fragment {
} }
logger.debug("LibraryTopFragment", "Item selected! Total item page: " + this.libraryItemPage.getListItems().size()); logger.debug("LibraryTopFragment", "Item selected! Total item page: " + this.libraryItemPage.getListItems().size());
if (!FeatureSwitch.RecyclerView.useSimpleNotifyMethod) {
getActivity().runOnUiThread(() -> { // TODO-rca: 実行条件を考える getActivity().runOnUiThread(() -> { // TODO-rca: 実行条件を考える
listItemAdapter.notifyItemRangeRemoved(0, this.libraryItemPage.getListItems().size() - 1); listItemAdapter.notifyItemRangeRemoved(0, this.libraryItemPage.getListItems().size() - 1);
}); });
}
listItemAdapter.setLibraryItemPage(this.libraryItemPage); listItemAdapter.setLibraryItemPage(this.libraryItemPage);
getActivity().runOnUiThread(() -> { getActivity().runOnUiThread(() -> {
if (FeatureSwitch.RecyclerView.useSimpleNotifyMethod) {
listItemAdapter.notifyDataSetChanged();
} else {
listItemAdapter.notifyItemRangeInserted(0, this.libraryItemPage.getListItems().size() - 1); listItemAdapter.notifyItemRangeInserted(0, this.libraryItemPage.getListItems().size() - 1);
}
}); });
}); });
} }
@ -269,6 +276,7 @@ public class LibraryPageFragment extends Fragment {
toolbar.setNavigationIcon(null); toolbar.setNavigationIcon(null);
} }
toolbar.setTitle(title); toolbar.setTitle(title);
toolbar.getMenu().clear();
toolbar.inflateMenu(R.menu.dir_menu); toolbar.inflateMenu(R.menu.dir_menu);
toolbar.setOnMenuItemClickListener(item -> { toolbar.setOnMenuItemClickListener(item -> {
if (item.getItemId() == R.id.menu_item_create_new_folder) { if (item.getItemId() == R.id.menu_item_create_new_folder) {

View File

@ -1,6 +1,5 @@
package one.nem.lacerta.feature.library; package one.nem.lacerta.feature.library;
import android.content.Intent;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -10,8 +9,6 @@ import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
import one.nem.lacerta.model.LibraryItemPage; import one.nem.lacerta.model.LibraryItemPage;
import one.nem.lacerta.model.ListItem; import one.nem.lacerta.model.ListItem;
import one.nem.lacerta.model.ListItemType; import one.nem.lacerta.model.ListItemType;

View File

@ -4,8 +4,8 @@
<item <item
android:id="@+id/menu_item_create_new_folder" android:id="@+id/menu_item_create_new_folder"
android:icon="@drawable/developer_mode_24px" android:icon="@drawable/create_new_folder_24px"
android:title="@string/app_name" android:title="@string/create_new_folder"
app:showAsAction="ifRoom"/> <!-- TODO-rca: change this --> app:showAsAction="never"/>
</menu> </menu>

View File

@ -1,3 +1,4 @@
<resources> <resources>
<string name="app_name">Library</string> <string name="app_name">Library</string>
<string name="create_new_folder">新しいフォルダを作成</string>
</resources> </resources>

View File

@ -17,16 +17,16 @@ import android.view.ViewGroup;
* Use the {@link SettingScanPageFragment#newInstance} factory method to * Use the {@link SettingScanPageFragment#newInstance} factory method to
* create an instance of this fragment. * create an instance of this fragment.
*/ */
public class SettingScanPageFragment extends PreferenceFragmentCompat { public class SettingScanPageFragment extends Fragment {
public SettingScanPageFragment() { public SettingScanPageFragment() {
// Required empty public constructor // Required empty public constructor
} }
//
@Override // @Override
public void onCreatePreferences(@Nullable Bundle savedInstanceState, @Nullable String rootKey) { // public void onCreatePreferences(@Nullable Bundle savedInstanceState, @Nullable String rootKey) {
addPreferencesFromResource(R.xml.scan_preferences); //// addPreferencesFromResource(R.xml.scan_preferences);
} // }
public static SettingScanPageFragment newInstance() { public static SettingScanPageFragment newInstance() {
SettingScanPageFragment fragment = new SettingScanPageFragment(); SettingScanPageFragment fragment = new SettingScanPageFragment();
@ -35,4 +35,15 @@ public class SettingScanPageFragment extends PreferenceFragmentCompat {
return fragment; return fragment;
} }
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_setting_scan_page, container, false);
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
}
} }

View File

@ -1,16 +1,15 @@
package one.nem.lacerta.setting; package one.nem.lacerta.setting;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.ArrayList; import java.util.ArrayList;
import one.nem.lacerta.setting.model.SettingListItem; import one.nem.lacerta.setting.model.SettingListItem;

View File

@ -1,14 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".SettingAboutPageFragment"> android:background="@color/colorSurface">
<!-- TODO: Update blank fragment layout --> <androidx.coordinatorlayout.widget.CoordinatorLayout
<TextView android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
app:contentScrim="@color/colorSecondaryContainer"
android:background="@color/colorSurface"
android:layout_width="match_parent"
android:layout_height="160dp"
android:fitsSystemWindows="true"
android:minHeight="?attr/actionBarSize"
app:collapsedTitleGravity="start|center_vertical"
app:expandedTitleGravity="start|bottom"
app:expandedTitleMarginBottom="16dp"
app:expandedTitleMarginStart="16dp"
app:expandedTitleTextAppearance="@style/TextAppearance.MaterialComponents.Headline4"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:title="@string/setting_top_about_title" />
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" /> app:layout_behavior="@string/appbar_scrolling_view_behavior" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:padding="32dp"
android:background="@drawable/rounded_secondary_container" >
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Work in Progress..."
android:textSize="24sp"
android:textColor="@color/colorOnSurfaceSecondary"/>
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="実装中..."
android:textSize="16sp"
android:textColor="@color/colorOnSurfaceSecondary"/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</FrameLayout> </FrameLayout>

View File

@ -1,14 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".SettingDataPageFragment"> android:background="@color/colorSurface">
<!-- TODO: Update blank fragment layout --> <androidx.coordinatorlayout.widget.CoordinatorLayout
<TextView android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
app:contentScrim="@color/colorSecondaryContainer"
android:background="@color/colorSurface"
android:layout_width="match_parent"
android:layout_height="160dp"
android:fitsSystemWindows="true"
android:minHeight="?attr/actionBarSize"
app:collapsedTitleGravity="start|center_vertical"
app:expandedTitleGravity="start|bottom"
app:expandedTitleMarginBottom="16dp"
app:expandedTitleMarginStart="16dp"
app:expandedTitleTextAppearance="@style/TextAppearance.MaterialComponents.Headline4"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:title="@string/setting_top_data_title" />
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" /> app:layout_behavior="@string/appbar_scrolling_view_behavior" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:padding="32dp"
android:background="@drawable/rounded_secondary_container" >
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Work in Progress..."
android:textSize="24sp"
android:textColor="@color/colorOnSurfaceSecondary"/>
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="実装中..."
android:textSize="16sp"
android:textColor="@color/colorOnSurfaceSecondary"/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</FrameLayout> </FrameLayout>

View File

@ -1,14 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".SettingDisplayPageFragment"> android:background="@color/colorSurface">
<!-- TODO: Update blank fragment layout --> <androidx.coordinatorlayout.widget.CoordinatorLayout
<TextView android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
app:contentScrim="@color/colorSecondaryContainer"
android:background="@color/colorSurface"
android:layout_width="match_parent"
android:layout_height="160dp"
android:fitsSystemWindows="true"
android:minHeight="?attr/actionBarSize"
app:collapsedTitleGravity="start|center_vertical"
app:expandedTitleGravity="start|bottom"
app:expandedTitleMarginBottom="16dp"
app:expandedTitleMarginStart="16dp"
app:expandedTitleTextAppearance="@style/TextAppearance.MaterialComponents.Headline4"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:title="@string/setting_top_display_title" />
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" /> app:layout_behavior="@string/appbar_scrolling_view_behavior" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:padding="32dp"
android:background="@drawable/rounded_secondary_container" >
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Work in Progress..."
android:textSize="24sp"
android:textColor="@color/colorOnSurfaceSecondary"/>
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="実装中..."
android:textSize="16sp"
android:textColor="@color/colorOnSurfaceSecondary"/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</FrameLayout> </FrameLayout>

View File

@ -39,11 +39,40 @@
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<FrameLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/setting_scan_page_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> app:layout_behavior="@string/appbar_scrolling_view_behavior" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:padding="32dp"
android:background="@drawable/rounded_secondary_container" >
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Work in Progress..."
android:textSize="24sp"
android:textColor="@color/colorOnSurfaceSecondary"/>
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="実装中..."
android:textSize="16sp"
android:textColor="@color/colorOnSurfaceSecondary"/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@color/colorOnSurface"
android:pathData="M570,630L630,630L630,550L710,550L710,490L630,490L630,410L570,410L570,490L490,490L490,550L570,550L570,630ZM172.31,780Q142,780 121,759Q100,738 100,707.69L100,252.31Q100,222 121,201Q142,180 172.31,180L391.92,180L471.92,260L787.69,260Q818,260 839,281Q860,302 860,332.31L860,707.69Q860,738 839,759Q818,780 787.69,780L172.31,780ZM172.31,720L787.69,720Q793.08,720 796.54,716.54Q800,713.08 800,707.69L800,332.31Q800,326.92 796.54,323.46Q793.08,320 787.69,320L447.39,320L367.39,240L172.31,240Q166.92,240 163.46,243.46Q160,246.92 160,252.31L160,707.69Q160,713.08 163.46,716.54Q166.92,720 172.31,720ZM160,720Q160,720 160,716.54Q160,713.08 160,707.69L160,252.31Q160,246.92 160,243.46Q160,240 160,240L160,240L160,320L160,320Q160,320 160,323.46Q160,326.92 160,332.31L160,707.69Q160,713.08 160,716.54Q160,720 160,720L160,720Z"/>
</vector>

View File

@ -20,7 +20,6 @@ import javax.xml.transform.stream.StreamResult;
import dagger.assisted.Assisted; import dagger.assisted.Assisted;
import dagger.assisted.AssistedInject; import dagger.assisted.AssistedInject;
import one.nem.lacerta.source.file.FileManager; import one.nem.lacerta.source.file.FileManager;
import one.nem.lacerta.utils.LacertaLogger; import one.nem.lacerta.utils.LacertaLogger;
import one.nem.lacerta.utils.Store; import one.nem.lacerta.utils.Store;

View File

@ -6,6 +6,16 @@ public class FeatureSwitch {
public static boolean canOverrideSwitch = false; public static boolean canOverrideSwitch = false;
} }
public static class RecyclerView {
public static boolean useSimpleNotifyMethod = true;
}
public static class Viewer {
public static boolean showOriginalImage = false;
public static int maxImageSize = 1024;
public static boolean showProgressBarWhenLoading = true;
}
public static class FeatureMaster { public static class FeatureMaster {
public static boolean enableSearch = false; public static boolean enableSearch = false;
public static boolean enableDebugMenu = true; public static boolean enableDebugMenu = true;

View File

@ -1,5 +1,6 @@
package one.nem.lacerta.vcs.impl; package one.nem.lacerta.vcs.impl;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
@ -136,6 +137,7 @@ public class LacertaVcsImpl implements LacertaVcs {
vcsRevModel.setId(vcsRevEntity.id); vcsRevModel.setId(vcsRevEntity.id);
vcsRevModel.setDocumentId(vcsRevEntity.documentId); vcsRevModel.setDocumentId(vcsRevEntity.documentId);
vcsRevModel.setBranchName(vcsRevEntity.branchName); vcsRevModel.setBranchName(vcsRevEntity.branchName);
vcsRevModel.setCreatedAt(vcsRevEntity.createdAt);
vcsRevModel.setCommitMessage(vcsRevEntity.commitMessage); vcsRevModel.setCommitMessage(vcsRevEntity.commitMessage);
vcsRevModel.setLogIds(vcsRevEntity.logIds); vcsRevModel.setLogIds(vcsRevEntity.logIds);
vcsRevModels.add(vcsRevModel); vcsRevModels.add(vcsRevModel);