Fixing merge bugs

This commit is contained in:
Clayton Wilson 2020-11-01 20:09:46 -05:00
parent 7c9f5cbd5e
commit 06dd554691
2 changed files with 14 additions and 23 deletions

View File

@ -208,24 +208,6 @@ public class MainActivity extends AppCompatActivity implements CreateListDialogF
}); });
} }
public void onClickSignout(MenuItem m) {
m.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
try {
am.signOutUser();
Intent intent = new Intent(MainActivity.this, com.example.listify.ui.LoginPage.class);
startActivity(intent);
finish();
}
catch (Exception e) {
Log.i("Authentication", e.toString());
}
return false;
}
});
}
@Override @Override
public void sendNewListName(String name) { public void sendNewListName(String name) {
Properties configs = new Properties(); Properties configs = new Properties();

View File

@ -340,15 +340,24 @@ public class SearchResults extends AppCompatActivity implements FilterDialogFrag
} }
} }
// Reset selected stores on search so that every store is selected
this.selectedStores.clear();
this.selectedStores.addAll(stores);
// Add all results to the sorted list // Add all results to the sorted list
resultsProductListSorted.addAll(resultsProductList); resultsProductListSorted.addAll(resultsProductList);
// Filtering should only be allowed if there are items in the results // Filtering should only be allowed if there are items in the results
runOnUiThread(new Runnable() {
@Override
public void run() {
if (resultsProductList.isEmpty()) { if (resultsProductList.isEmpty()) {
filterItem.setEnabled(false); filterItem.setEnabled(false);
} else { } else {
filterItem.setEnabled(true); filterItem.setEnabled(true);
} }
}
});
// Apply selected sorting to the list // Apply selected sorting to the list
sortResults(); sortResults();