mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-11-04 19:25:27 -07:00
bugfixes in the app
This commit is contained in:
1 parent
967b87d9d3
commit
f482300fd1
1 file changed
+10
-4
@@ -491,16 +491,22 @@ public class AlternativesActivity extends ListActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void filterOnTopics(List<Topic> selected_topics) {
|
void filterOnTopics(List<Topic> selected_topics) {
|
||||||
if (mSourceTopic != null && !selected_topics.contains(mSourceTopic))
|
if (mSourceTopic != null && !selected_topics.contains(mSourceTopic)) {
|
||||||
mAlternatives = null;
|
mAlternatives = null;
|
||||||
|
mOriginalAlternatives = null;
|
||||||
|
mTopics = null;
|
||||||
|
mAllTopics = mOriginalAllTopics;
|
||||||
|
}
|
||||||
|
|
||||||
if (mAlternatives == null) {
|
if (mAlternatives == null) {
|
||||||
if (selected_topics.size() == 0)
|
if (selected_topics.size() == 0) {
|
||||||
|
notifyDataSetChanged();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mSourceTopic = selected_topics.get(0);
|
mSourceTopic = selected_topics.get(0);
|
||||||
mAlternatives = mTranslator.getTopicWords(mSourceTopic.expr);
|
mAlternatives = mTranslator.getTopicWords(mSourceTopic.expr);
|
||||||
|
|
||||||
mTopics = new ArrayList<List<Topic>>();
|
mTopics = new ArrayList<List<Topic>>();
|
||||||
for (Expr e : mAlternatives) {
|
for (Expr e : mAlternatives) {
|
||||||
List<Topic> topics = new ArrayList<Topic>();
|
List<Topic> topics = new ArrayList<Topic>();
|
||||||
|
|||||||
Reference in new issue
Block a user