Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bugs that occur the most on Fabric #380

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

n0m0r3pa1n
Copy link
Contributor

Several small bugs

Screenshot from 2019-06-08 07-25-48

@@ -19,59 +19,14 @@ public static void terminate() {
FolioDatabaseHelper.clearInstance();
}

public static boolean insert(String table, ContentValues contentValues) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So much unused code, not sure why you need it

@@ -244,6 +245,7 @@ class FolioActivity : AppCompatActivity(), FolioActivityCallback, MediaControlle

// Need to add when vector drawables support library is used.
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true)
DbAdapter.initialize(this)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using static classes that are initialized somewhere in the lifecycle is not a good practice at all. But it will require a lot refactoring to fix everything.

Log.v(LOG_TAG, "-> onPageFinished -> readLocator -> " + cfi!!)
mWebview!!.loadUrl(String.format(getString(R.string.callScrollToCfi), cfi))
cfi?.let {
Log.v(LOG_TAG, "-> onPageFinished -> readLocator -> $cfi")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the app need to crash if there are problems with the WebView?

@@ -839,7 +841,7 @@ class FolioPageFragment : Fragment(),
if (outState != null)
outState!!.putSerializable(BUNDLE_READ_LOCATOR_CONFIG_CHANGE, lastReadLocator)
if (activity != null && !activity!!.isFinishing)
mActivityCallback!!.storeLastReadLocator(lastReadLocator)
mActivityCallback?.storeLastReadLocator(lastReadLocator)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently, this is null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant