Skip to content

Commit

Permalink
Merge pull request #1514 from moneymanagerex/v19
Browse files Browse the repository at this point in the history
auto transaction number per behavior settings
  • Loading branch information
guanlisheng authored Jan 12, 2024
2 parents b1bea2a + dabc2cd commit 5aaff3f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ android {

defaultConfig {
applicationId "com.money.manager.ex"
versionCode 1011
versionCode 1012
//versionName getVersionAsDate() + "." + versionCode
versionName "2024.01.10"
versionName "2024.01.12"
// $applicationId
setProperty("archivesBaseName", "ammx-$versionName")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ public void setSmsTransStatusNotification(boolean status) {
set(PreferenceConstants.PREF_SMS_TRANS_STATUS_NOTIFICATION, status);
}

public boolean getAutoTransactionNumber(){
return get(R.string.pref_auto_transaction_number, false);
}
public Boolean getShowTutorial() {
return get(R.string.pref_show_tutorial, true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
import com.money.manager.ex.domainmodel.Payee;
import com.money.manager.ex.servicelayer.AccountService;
import com.money.manager.ex.settings.AppSettings;
import com.money.manager.ex.settings.BehaviourSettings;
import com.money.manager.ex.utils.MmxDate;
import com.money.manager.ex.utils.MmxDateTimeUtils;
import com.shamanland.fonticon.FontIconView;
Expand Down Expand Up @@ -706,7 +707,7 @@ public void onClick(View v) {
}
});

if (!transactionEntity.hasId()) {
if (!transactionEntity.hasId() && (new BehaviourSettings(getContext()).getAutoTransactionNumber())) {
viewHolder.btnTransNumber.callOnClick();
}
}
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -782,4 +782,6 @@
<string name="pref_anonymous_usage">prefanonymoususage</string>
<string name="summary_anonymous_usage">Enable to help us sending anonymous data about MMEX usage</string>
<string name="title_anonymous_usage">Send anonymous usage data</string>
<string name="pref_auto_transaction_number">prefautotransactionnumber</string>
<string name="title_auto_transaction_number">Auto populate transaction number</string>
</resources>
6 changes: 6 additions & 0 deletions app/src/main/res/xml/preferences_behaviour.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@
android:summary="@string/summary_sms_trans_status_notification"
android:title="@string/title_sms_trans_status_notification" />

<SwitchPreferenceCompat
android:icon="@null"
android:defaultValue="false"
android:key="@string/pref_auto_transaction_number"
android:title="@string/title_auto_transaction_number" />

<SwitchPreferenceCompat
android:icon="@null"
android:defaultValue="true"
Expand Down

0 comments on commit 5aaff3f

Please sign in to comment.