Skip to content

Commit

Permalink
Fix "no such table" bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
fat-tire committed Sep 26, 2018
1 parent 7fb687e commit 802930a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/org/havenapp/main/HavenApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
import com.facebook.drawee.backends.pipeline.Fresco;
import com.facebook.imagepipeline.core.ImagePipelineConfig;
import com.facebook.imagepipeline.decoder.SimpleProgressiveJpegConfig;
import com.orm.SchemaGenerator;
import com.orm.SugarContext;
import com.orm.SugarDb;

import java.io.IOException;

Expand All @@ -46,7 +48,10 @@ public class HavenApp extends MultiDexApplication {
public void onCreate() {
super.onCreate();

SugarContext.init(this);
SugarContext.init(getApplicationContext());

SchemaGenerator schemaGenerator = new SchemaGenerator(this);
schemaGenerator.createDatabase(new SugarDb(this).getDB());

mPrefs = new PreferenceManager(this);

Expand Down

0 comments on commit 802930a

Please sign in to comment.