Fix database syncronization
When connecting to the internet for the first time, the proclamations table is empty. If the user navigates to Settings -> Proclamations, then the sync.SyncProclamations function is called. After this function returns, the ProclamationOptions screen queries the database for proclamations which returns an empty list. Even though the database was updated, the ProclamationOptions screen's instance of the database connection was returning empty.
This commit is contained in:
+3
-8
@@ -37,12 +37,9 @@ package mix
|
||||
//}
|
||||
//#endif
|
||||
import "C"
|
||||
import (
|
||||
"reflect"
|
||||
"unsafe"
|
||||
|
||||
"github.com/veandco/go-sdl2/sdl"
|
||||
)
|
||||
import "unsafe"
|
||||
import "reflect"
|
||||
import "github.com/veandco/go-sdl2/sdl"
|
||||
|
||||
// Chunk is the internal format for an audio chunk.
|
||||
// (https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_85.html)
|
||||
@@ -215,7 +212,6 @@ func LoadWAV(file string) (chunk *Chunk, err error) {
|
||||
chunk = (*Chunk)(unsafe.Pointer(C.Mix_LoadWAV_RW(C.SDL_RWFromFile(_file, _rb), 1)))
|
||||
if chunk == nil {
|
||||
err = sdl.GetError()
|
||||
return nil, err
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -228,7 +224,6 @@ func LoadMUS(file string) (mus *Music, err error) {
|
||||
mus = (*Music)(unsafe.Pointer(C.Mix_LoadMUS(_file)))
|
||||
if mus == nil {
|
||||
err = sdl.GetError()
|
||||
return nil, err
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user