remove duplicated class and package
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Raffaele Mignone 2020-01-11 14:49:43 +01:00
parent 8b6104e0fa
commit 04714a4479
Signed by: norangebit
GPG Key ID: F5255658CB220573
6 changed files with 5 additions and 52 deletions

View File

@ -13,7 +13,7 @@ import it.unisannio.ding.ids.wedroid.app.R
import it.unisannio.ding.ids.wedroid.app.util.PreferenceReader import it.unisannio.ding.ids.wedroid.app.util.PreferenceReader
import it.unisannio.ding.ids.wedroid.app.util.SharedPreferenceHelper import it.unisannio.ding.ids.wedroid.app.util.SharedPreferenceHelper
import it.unisannio.ding.ids.wedroid.app.view.adapter.BoardsListAdapter import it.unisannio.ding.ids.wedroid.app.view.adapter.BoardsListAdapter
import it.unisannio.ding.ids.wedroid.app.viewModel.BoardsListViewModel import it.unisannio.ding.ids.wedroid.app.viewmodel.BoardsListViewModel
import it.unisannio.ding.ids.wedroid.wrapper.entity.BoardBackgroundColor import it.unisannio.ding.ids.wedroid.wrapper.entity.BoardBackgroundColor
import kotlinx.android.synthetic.main.activity_boards_lists.* import kotlinx.android.synthetic.main.activity_boards_lists.*

View File

@ -23,10 +23,10 @@ import java.util.Objects;
import it.unisannio.ding.ids.wedroid.app.R; import it.unisannio.ding.ids.wedroid.app.R;
import it.unisannio.ding.ids.wedroid.app.viewModel.WListsListViewModel;
import it.unisannio.ding.ids.wedroid.app.data.entity.WList; import it.unisannio.ding.ids.wedroid.app.data.entity.WList;
import it.unisannio.ding.ids.wedroid.app.util.SharedPreferenceHelper; import it.unisannio.ding.ids.wedroid.app.util.SharedPreferenceHelper;
import it.unisannio.ding.ids.wedroid.app.view.adapter.WListsAdapter; import it.unisannio.ding.ids.wedroid.app.view.adapter.WListsAdapter;
import it.unisannio.ding.ids.wedroid.app.viewmodel.WListsListViewModel;
public class WListsListActivity extends AppCompatActivity { public class WListsListActivity extends AppCompatActivity {

View File

@ -1,47 +0,0 @@
package it.unisannio.ding.ids.wedroid.app.viewModel;
import android.app.Application;
import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.LiveData;
import java.util.List;
import it.unisannio.ding.ids.wedroid.app.data.database.WListDatabase;
import it.unisannio.ding.ids.wedroid.app.data.entity.WList;
import it.unisannio.ding.ids.wedroid.app.data.repository.WListRepository;
import it.unisannio.ding.ids.wedroid.app.util.PreferenceReader;
import it.unisannio.ding.ids.wedroid.app.util.ServicesFactory;
import it.unisannio.ding.ids.wedroid.app.util.SharedPreferenceHelper;
public class WListsListViewModel extends AndroidViewModel {
private WListRepository wListRepository;
private LiveData<List<WList>> allWLists;
public WListsListViewModel(@NonNull Application application) {
super(application);
PreferenceReader reader = new SharedPreferenceHelper(application);
wListRepository = new WListRepository(
WListDatabase.getDatabase(application).wListDao(),
ServicesFactory.Companion.getInstance(reader).getListService(),
reader);
allWLists = wListRepository.getAllWLists();
}
public LiveData<List<WList>> getAllWLists(){
return allWLists;
}
public void deleteWList(int position, String idBoard) {
List<WList> wList = allWLists.getValue();
if (wList != null)
wListRepository.deleteWList(idBoard, wList.get(position).getId());
}
public void refresh() {
wListRepository.synchronize();
}
}

View File

@ -1,4 +1,4 @@
package it.unisannio.ding.ids.wedroid.app.viewModel; package it.unisannio.ding.ids.wedroid.app.viewmodel;
import android.app.Application; import android.app.Application;

View File

@ -1,4 +1,4 @@
package it.unisannio.ding.ids.wedroid.app.viewModel; package it.unisannio.ding.ids.wedroid.app.viewmodel;
import android.app.Application; import android.app.Application;