Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/main/java/de/blau/android/filter/TagFilterActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
Expand Down Expand Up @@ -449,6 +450,15 @@ public void notifyDataSetChanged(@NonNull String filter) {

}

@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (mCursor.isClosed()) {
Log.w(DEBUG_TAG, "cursor closed, recreating");
updateAdapter(TagFilterDatabaseHelper.getCurrent(db));
}
return super.getView(position, convertView, parent);
}

@Override
public View newView(Context context, Cursor cursor, ViewGroup parent) {
Log.d(DEBUG_TAG, "newView");
Expand Down
7 changes: 1 addition & 6 deletions src/main/java/de/blau/android/osm/StorageDelegator.java
Original file line number Diff line number Diff line change
Expand Up @@ -622,12 +622,7 @@ public Way createAndInsertWay(@NonNull final Node firstWayNode) {
dirty = true;
Way way = factory.createWayWithNewId();
way.addNode(firstWayNode);
try {
lock();
insertElementUnsafe(way);
} finally {
unlock();
}
insertElementUnsafe(way);
return way;
}

Expand Down
Loading