Skip to content

Commit 00f9152

Browse files
author
ktc
committed
0.1.0
1 parent 51670b6 commit 00f9152

File tree

4 files changed

+2
-13
lines changed

4 files changed

+2
-13
lines changed

Diff for: sample/src/main/java/com/github/bh90210/sample/MainActivity.java

-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
import android.widget.TableLayout;
1919
import android.widget.TextView;
2020

21-
import java.nio.ByteBuffer;
2221
import java.util.Iterator;
23-
import java.util.Map;
2422

2523
import static android.view.WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN;
2624

Diff for: simpledbw/dbwrapper.aar

-1.26 KB
Binary file not shown.

Diff for: simpledbw/src/main/java/com/github/bh90210/simpledbw/Database.java

-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
package com.github.bh90210.simpledbw;
22

33
import androidx.collection.ArrayMap;
4-
5-
import java.nio.ByteBuffer;
6-
import java.util.Arrays;
7-
import java.util.Collection;
8-
94
import dbwrapper.Dbwrapper;
105
import dbwrapper.SimpleDBW;
116

Diff for: wrapper.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,10 @@ func (db *SimpleDBW) Update(key, value []byte) {
7676

7777
// PrePopulate database function
7878
func (db *SimpleDBW) PrePopulate(key, value []byte) {
79-
keyHelper := string(key) + "_HELPER"
80-
init := db.View([]byte(keyHelper))
79+
init := db.View(key)
8180
inittoString := string(init)
82-
if inittoString == "1" {
83-
// if true means pre-populate has already ran so do nothing
84-
} else {
81+
if inittoString == "key does not exist" {
8582
db.Update(key, value)
86-
db.Update([]byte(keyHelper), []byte("1"))
8783
}
8884
}
8985

0 commit comments

Comments
 (0)