Skip to content

Commit 477b1ff

Browse files
committed
update commons to 5.3.13
1 parent 05c798d commit 477b1ff

File tree

5 files changed

+17
-48
lines changed

5 files changed

+17
-48
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ android {
4141
}
4242

4343
dependencies {
44-
implementation 'com.simplemobiletools:commons:5.2.10'
44+
implementation 'com.simplemobiletools:commons:5.3.13'
4545
implementation 'com.facebook.stetho:stetho:1.5.0'
4646
}
4747

app/src/main/kotlin/com/simplemobiletools/notes/activities/MainActivity.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import android.view.MenuItem
1313
import com.simplemobiletools.commons.dialogs.ConfirmationAdvancedDialog
1414
import com.simplemobiletools.commons.dialogs.FilePickerDialog
1515
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
16+
import com.simplemobiletools.commons.dialogs.UpgradeToProDialog
1617
import com.simplemobiletools.commons.extensions.*
1718
import com.simplemobiletools.commons.helpers.*
1819
import com.simplemobiletools.commons.models.FAQItem
@@ -85,6 +86,11 @@ class MainActivity : SimpleActivity() {
8586

8687
wasInit = true
8788
checkAppOnSDCard()
89+
90+
if (!config.wasInitialUpgradeToProShown) {
91+
UpgradeToProDialog(this)
92+
config.wasInitialUpgradeToProShown = true
93+
}
8894
}
8995

9096
override fun onResume() {

app/src/main/kotlin/com/simplemobiletools/notes/activities/SettingsActivity.kt

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,21 @@ import com.simplemobiletools.notes.extensions.config
1212
import com.simplemobiletools.notes.extensions.dbHelper
1313
import com.simplemobiletools.notes.extensions.updateWidgets
1414
import com.simplemobiletools.notes.helpers.*
15-
import com.simplemobiletools.notes.models.Note
1615
import kotlinx.android.synthetic.main.activity_settings.*
1716
import java.util.*
1817

1918
class SettingsActivity : SimpleActivity() {
20-
var notes = ArrayList<Note>()
21-
2219
override fun onCreate(savedInstanceState: Bundle?) {
2320
super.onCreate(savedInstanceState)
2421
setContentView(R.layout.activity_settings)
25-
notes = dbHelper.getNotes()
2622
}
2723

2824
override fun onResume() {
2925
super.onResume()
3026

31-
setupPurchaseThankYou()
27+
setupUpgradeToPro()
3228
setupCustomizeColors()
3329
setupUseEnglish()
34-
setupAvoidWhatsNew()
3530
setupAutosaveNotes()
3631
setupDisplaySuccess()
3732
setupClickableLinks()
@@ -56,10 +51,10 @@ class SettingsActivity : SimpleActivity() {
5651
}
5752
}
5853

59-
private fun setupPurchaseThankYou() {
60-
settings_purchase_thank_you_holder.beVisibleIf(config.appRunCount > 10 && !isThankYouInstalled())
61-
settings_purchase_thank_you_holder.setOnClickListener {
62-
launchPurchaseThankYouIntent()
54+
private fun setupUpgradeToPro() {
55+
settings_upgrade_to_pro_holder.beGoneIf(isAProApp())
56+
settings_upgrade_to_pro_holder.setOnClickListener {
57+
launchUpgradeToProIntent()
6358
}
6459
}
6560

@@ -79,14 +74,6 @@ class SettingsActivity : SimpleActivity() {
7974
}
8075
}
8176

82-
private fun setupAvoidWhatsNew() {
83-
settings_avoid_whats_new.isChecked = config.avoidWhatsNew
84-
settings_avoid_whats_new_holder.setOnClickListener {
85-
settings_avoid_whats_new.toggle()
86-
config.avoidWhatsNew = settings_avoid_whats_new.isChecked
87-
}
88-
}
89-
9077
private fun setupAutosaveNotes() {
9178
settings_autosave_notes.isChecked = config.autosaveNotes
9279
settings_autosave_notes_holder.setOnClickListener {
@@ -128,7 +115,7 @@ class SettingsActivity : SimpleActivity() {
128115
}
129116

130117
private fun setupShowNotePicker() {
131-
settings_show_note_picker_holder.beVisibleIf(notes.size > 1)
118+
settings_show_note_picker_holder.beVisibleIf(dbHelper.getNotes().size > 1)
132119
settings_show_note_picker.isChecked = config.showNotePicker
133120
settings_show_note_picker_holder.setOnClickListener {
134121
settings_show_note_picker.toggle()

app/src/main/res/layout/activity_settings.xml

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
android:orientation="vertical">
1414

1515
<RelativeLayout
16-
android:id="@+id/settings_purchase_thank_you_holder"
16+
android:id="@+id/settings_upgrade_to_pro_holder"
1717
android:layout_width="match_parent"
1818
android:layout_height="wrap_content"
1919
android:layout_marginTop="@dimen/medium_margin"
@@ -24,13 +24,13 @@
2424
android:paddingBottom="@dimen/activity_margin">
2525

2626
<com.simplemobiletools.commons.views.MyTextView
27-
android:id="@+id/settings_purchase_thank_you"
27+
android:id="@+id/settings_upgrade_to_pro"
2828
android:layout_width="wrap_content"
2929
android:layout_height="wrap_content"
3030
android:layout_centerVertical="true"
3131
android:paddingStart="@dimen/medium_margin"
3232
android:paddingLeft="@dimen/medium_margin"
33-
android:text="@string/purchase_simple_thank_you"/>
33+
android:text="@string/upgrade_to_pro"/>
3434

3535
</RelativeLayout>
3636

@@ -306,30 +306,6 @@
306306
android:textAllCaps="true"
307307
android:textSize="@dimen/smaller_text_size"/>
308308

309-
<RelativeLayout
310-
android:id="@+id/settings_avoid_whats_new_holder"
311-
android:layout_width="match_parent"
312-
android:layout_height="wrap_content"
313-
android:layout_marginTop="@dimen/medium_margin"
314-
android:background="?attr/selectableItemBackground"
315-
android:paddingLeft="@dimen/normal_margin"
316-
android:paddingTop="@dimen/activity_margin"
317-
android:paddingRight="@dimen/normal_margin"
318-
android:paddingBottom="@dimen/activity_margin">
319-
320-
<com.simplemobiletools.commons.views.MySwitchCompat
321-
android:id="@+id/settings_avoid_whats_new"
322-
android:layout_width="match_parent"
323-
android:layout_height="wrap_content"
324-
android:background="@null"
325-
android:clickable="false"
326-
android:paddingStart="@dimen/medium_margin"
327-
android:paddingLeft="@dimen/medium_margin"
328-
android:text="@string/avoid_whats_new"
329-
app:switchPadding="@dimen/medium_margin"/>
330-
331-
</RelativeLayout>
332-
333309
<RelativeLayout
334310
android:id="@+id/settings_cursor_placement_holder"
335311
android:layout_width="match_parent"

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.2.71'
4+
ext.kotlin_version = '1.3.0'
55

66
repositories {
77
google()

0 commit comments

Comments
 (0)