Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Barashkov committed Jul 31, 2021
2 parents 56097f4 + b509256 commit 9f6fbea
Show file tree
Hide file tree
Showing 405 changed files with 1,833 additions and 4,861 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ app/release/output.json
*.aab
app/untied/release/output.json
app/fdroid/release/output.json
fastlane/.env.default
Keys/financier.properties
Keys/Signing.keystore
fastlane/fastlane_key.json
fastlane/report.xml
16 changes: 8 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ android {
applicationId "com.handydev.financier"
minSdkVersion 21
targetSdkVersion 29
versionCode 218
versionName "2.0.18"
versionCode 219
versionName "2.0.19"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
javaCompileOptions {
Expand Down Expand Up @@ -181,29 +181,29 @@ dependencies {
annotationProcessor "org.androidannotations:androidannotations:$AAVersion"
implementation "org.androidannotations:androidannotations-api:$AAVersion"

implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.google.code.gson:gson:2.8.7'
implementation 'net.sf.trove4j:trove4j:3.0.3'

implementation 'com.dropbox.core:dropbox-core-sdk:3.1.3'
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
implementation 'com.squareup.okio:okio:2.8.0'
implementation 'com.squareup.okio:okio:2.9.0'
implementation "org.greenrobot:eventbus:$eventbus_version"
kapt "org.greenrobot:eventbus-annotation-processor:$eventbus_version"
implementation 'com.wdullaer:materialdatetimepicker:3.6.4'
implementation 'commons-io:commons-io:2.6'
implementation 'com.mtramin:rxfingerprint:2.2.1'
implementation 'io.reactivex.rxjava2:rxjava:2.2.19'
implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'org.reactivestreams:reactive-streams:1.0.3'
implementation 'com.mlsdev.rximagepicker:library:2.1.5'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'com.github.bumptech.glide:glide:4.12.0'
implementation 'com.google.android.material:material:1.4.0'

implementation fileTree(include: '**/*.jar', dir: 'libs')

testImplementation 'junit:junit:4.13.1'
testImplementation 'junit:junit:4.13.2'
testImplementation 'androidx.test:core:1.4.0'
testImplementation 'org.robolectric:robolectric:4.4'
testImplementation 'org.robolectric:robolectric:4.5.1'
implementation "androidx.core:core-ktx:1.6.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class MenuListFragment: ListFragment() {
bus = EventBus.getDefault()
menuItems = MenuListItem.values()
menuItems = menuItems.filter { it != MenuListItem.GOOGLE_DRIVE_BACKUP && it != MenuListItem.GOOGLE_DRIVE_RESTORE }.toTypedArray()
listAdapter = SummaryEntityListAdapter(activity!!, menuItems)
listAdapter = SummaryEntityListAdapter(requireActivity(), menuItems)
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
Expand All @@ -54,7 +54,7 @@ class MenuListFragment: ListFragment() {
if(activity == null) {
return
}
menuItems[position].call(activity!!)
menuItems[position].call(requireActivity())
}

fun redirectedActivityResult(requestCode: Int, resultCode: Int, data:Intent?) {
Expand Down Expand Up @@ -116,53 +116,53 @@ class MenuListFragment: ListFragment() {
private fun onCsvExportResult(resultCode: Int, data: Intent?) {
if (resultCode == Activity.RESULT_OK && activity != null) {
val options = CsvExportOptions.fromIntent(data)
MenuListItem.doCsvExport(activity!!, options)
MenuListItem.doCsvExport(requireActivity(), options)
}
}

// @OnActivityResult(MenuListItem.ACTIVITY_QIF_EXPORT)
private fun onQifExportResult(resultCode: Int, data: Intent?) {
if (resultCode == Activity.RESULT_OK && activity != null) {
val options = QifExportOptions.fromIntent(data)
MenuListItem.doQifExport(activity!!, options)
MenuListItem.doQifExport(requireActivity(), options)
}
}

//@OnActivityResult(MenuListItem.ACTIVITY_CSV_IMPORT)
private fun onCsvImportResult(resultCode: Int, data: Intent?) {
if (resultCode == Activity.RESULT_OK && activity != null) {
val options = CsvImportOptions.fromIntent(data)
MenuListItem.doCsvImport(activity!!, options)
MenuListItem.doCsvImport(requireActivity(), options)
}
}

//@OnActivityResult(MenuListItem.ACTIVITY_QIF_IMPORT)
private fun onQifImportResult(resultCode: Int, data: Intent?) {
if (resultCode == Activity.RESULT_OK && activity != null) {
val options = QifImportOptions.fromIntent(data)
MenuListItem.doQifImport(activity!!, options)
MenuListItem.doQifImport(requireActivity(), options)
}
}

//@OnActivityResult(MenuListItem.ACTIVITY_CHANGE_PREFERENCES)
private fun onChangePreferences() {
if(activity != null) {
DailyAutoBackupScheduler.scheduleNextAutoBackup(activity!!)
DailyAutoBackupScheduler.scheduleNextAutoBackup(requireActivity())
}
}

override fun onPause() {
super.onPause()
if(activity != null) {
PinProtection.lock(activity!!)
PinProtection.lock(requireActivity())
}
bus!!.unregister(this)
}

override fun onResume() {
super.onResume()
if(activity != null) {
PinProtection.unlock(activity!!)
PinProtection.unlock(requireActivity())
}
bus!!.register(this)
}
Expand All @@ -181,7 +181,7 @@ class MenuListFragment: ListFragment() {
//@OnActivityResult(RESOLVE_CONNECTION_REQUEST_CODE)
private fun onConnectionRequest(resultCode: Int) {
if (resultCode == Activity.RESULT_OK && activity != null) {
Toast.makeText(activity!!, R.string.google_drive_connection_resolved, Toast.LENGTH_LONG).show()
Toast.makeText(requireActivity(), R.string.google_drive_connection_resolved, Toast.LENGTH_LONG).show()
}
}

Expand All @@ -191,12 +191,12 @@ class MenuListFragment: ListFragment() {
val backupFiles = event.files
if (backupFiles != null && activity != null) {
val selectedDropboxFile = arrayOfNulls<String>(1)
AlertDialog.Builder(activity!!)
AlertDialog.Builder(requireActivity())
.setTitle(R.string.restore_database_online_dropbox)
.setPositiveButton(R.string.restore) { _, _ ->
if (selectedDropboxFile[0] != null) {
val d = ProgressDialog.show(activity!!, null, getString(R.string.restore_database_inprogress_dropbox), true)
DropboxRestoreTask(activity!!, d, selectedDropboxFile[0]).execute()
val d = ProgressDialog.show(requireActivity(), null, getString(R.string.restore_database_inprogress_dropbox), true)
DropboxRestoreTask(requireActivity(), d, selectedDropboxFile[0]).execute()
}
}
.setSingleChoiceItems(backupFiles, -1, DialogInterface.OnClickListener { dialog: DialogInterface?, which: Int ->
Expand All @@ -213,17 +213,17 @@ class MenuListFragment: ListFragment() {
if(activity == null) {
return
}
val d = ProgressDialog.show(activity!!, null, this.getString(R.string.backup_database_dropbox_inprogress), true)
DropboxBackupTask(activity!!, d).execute()
val d = ProgressDialog.show(requireActivity(), null, this.getString(R.string.backup_database_dropbox_inprogress), true)
DropboxBackupTask(requireActivity(), d).execute()
}

@Subscribe(threadMode = ThreadMode.MAIN)
fun doDropboxRestore(e: StartDropboxRestore?) {
if(activity == null) {
return
}
val d = ProgressDialog.show(activity!!, null, this.getString(R.string.dropbox_loading_files), true)
DropboxListFilesTask(activity!!, d).execute()
val d = ProgressDialog.show(requireActivity(), null, this.getString(R.string.dropbox_loading_files), true)
DropboxListFilesTask(requireActivity(), d).execute()
}

class StartDropboxBackup
Expand Down
5 changes: 0 additions & 5 deletions app/src/fdroid/res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,6 @@
android:key="ntsl_open_calculator_for_template_transactions"
android:summary="@string/open_calculator_for_template_transactions_summary"
android:title="@string/open_calculator_for_template_transactions" />
<CheckBoxPreference
android:defaultValue="true"
android:key="ntsl_set_focus_on_amount_field"
android:summary="@string/set_focus_on_amount_field_summary"
android:title="@string/set_focus_on_amount_field" />
</PreferenceCategory>
</PreferenceScreen>
</PreferenceCategory>
Expand Down
Loading

0 comments on commit 9f6fbea

Please sign in to comment.