fix app crash introduced due to refactorings

This commit is contained in:
David Luhmer 2018-10-28 20:13:17 +01:00
parent a2e76e61cf
commit da5d1f873b
5 changed files with 10 additions and 16 deletions

View file

@ -235,10 +235,9 @@ public class SubscriptionExpandableListAdapter extends BaseExpandableListAdapter
}
@Override
public View getGroupView(final int groupPosition, final boolean isExpanded,
View convertView, ViewGroup parent) {
public View getGroupView(final int groupPosition, final boolean isExpanded, View convertView, ViewGroup parent) {
GroupHolder viewHolder;
GroupHolder viewHolder;
final AbstractItem group = (AbstractItem) getGroup(groupPosition);
if (convertView == null) {
@ -598,7 +597,7 @@ public class SubscriptionExpandableListAdapter extends BaseExpandableListAdapter
}
protected void fireListTextClicked(long idFeed, boolean isFolder, Long optional_folder_id)
{
if(eListTextClickHandler != null)
if(eListTextClickHandler != null)
eListTextClickHandler.onTextClicked(idFeed, isFolder, optional_folder_id);
}
protected void fireListTextLongClicked(long idFeed, boolean isFolder, Long optional_folder_id)

View file

@ -553,7 +553,7 @@ public class NewsReaderListActivity extends PodcastFragmentActivity implements
* that the item with the given ID was selected.
*/
@Override
public void onTopItemClicked(long idFeed, boolean isFolder, long optional_folder_id) {
public void onTopItemClicked(long idFeed, boolean isFolder, Long optional_folder_id) {
if (drawerLayout != null)
drawerLayout.closeDrawer(GravityCompat.START);

View file

@ -119,12 +119,11 @@ public class NewsReaderListFragment extends Fragment implements OnCreateContextM
* Callback for when an item has been selected.
*/
void onChildItemClicked(long idFeed, Long optional_folder_id);
void onTopItemClicked(long idFeed, boolean isFolder, long onTopItemClicked);
void onTopItemClicked(long idFeed, boolean isFolder, Long onTopItemClicked);
void onChildItemLongClicked(long idFeed);
void onTopItemLongClicked(long idFeed, boolean isFolder);
}
private SubscriptionExpandableListAdapter lvAdapter;
@BindView(R.id.expandableListView) protected ExpandableListView eListView;
@ -208,7 +207,7 @@ public class NewsReaderListFragment extends Fragment implements OnCreateContextM
@Override
public void onTextClicked(long idFeed, boolean isFolder, Long optional_folder_id) {
mCallbacks.onTopItemClicked(idFeed, isFolder, optional_folder_id);
mCallbacks.onTopItemClicked(idFeed, isFolder, optional_folder_id);
}
@Override

View file

@ -26,8 +26,7 @@ public abstract class AbstractItem {
public String header;
public Long idFolder;
AbstractItem(long id_database, String header, Long idFolder)
{
AbstractItem(long id_database, String header, Long idFolder) {
this.id_database = id_database;
this.header = header;
this.idFolder = idFolder;

View file

@ -23,11 +23,8 @@ package de.luhmer.owncloudnewsreader.model;
public class FolderSubscribtionItem extends AbstractItem {
public FolderSubscribtionItem(String headerFolder, Long idFolder, long idFolder_database) {
public FolderSubscribtionItem(String headerFolder, Long idFolder, long idFolder_database) {
super(idFolder_database, headerFolder, idFolder_database);
this.idFolder = idFolder;
}
this.idFolder = idFolder;
}
}