Skip to content

Commit

Permalink
Apply & Fix Detekt, Ktlint Rules in Account Module (#2678)
Browse files Browse the repository at this point in the history
* Apply & Fix Detekt, Ktlint Rules in Account Module

Jira Tasks - [MM-64](https://mifosforge.jira.com/browse/MM-64)

* Refactor- [:feature:auth] Apply & Fix Detekt, Ktlint Rules

Jira Tasks - [MM-65](https://mifosforge.jira.com/browse/MM-65)

* Refactor- [:feature:beneficiary] Apply & Fix Detekt, Ktlint Rules

Jira Tasks - [MM-66](https://mifosforge.jira.com/browse/MM-66)
  • Loading branch information
niyajali authored Aug 31, 2024
1 parent 64609f6 commit 6c1d871
Show file tree
Hide file tree
Showing 118 changed files with 2,737 additions and 2,343 deletions.
4 changes: 2 additions & 2 deletions androidApp/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
android:name=".MifosSelfServiceApp"
android:allowBackup="true"
android:icon="@mipmap/core_common_mifos_icon"
android:label="@string/app_name"
android:label="@string/feature_about_app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
Expand All @@ -36,7 +36,7 @@
<activity
android:name=".ui.activities.LoginActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:label="@string/feature_about_app_name"
android:windowSoftInputMode="adjustResize" />

<activity android:name="com.canhub.cropper.CropImageActivity"
Expand Down
17 changes: 8 additions & 9 deletions androidApp/src/main/java/org/mifos/mobile/utils/StatusUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import android.content.Context
import androidx.core.content.ContextCompat
import org.mifos.mobile.R
import org.mifos.mobile.core.model.entity.CheckboxStatus
import org.mifos.mobile.ui.getThemeAttributeColor

/**
* Created by dilpreet on 3/7/17.
Expand All @@ -15,53 +14,53 @@ object StatusUtils {
val arrayList = ArrayList<CheckboxStatus>()
arrayList.add(
CheckboxStatus(
context?.getString(R.string.deposit),
context?.getString(R.string.feature_account_deposit),
ContextCompat
.getColor(context!!, R.color.deposit_green),
),
)
arrayList.add(
CheckboxStatus(
context.getString(R.string.dividend_payout),
context.getString(R.string.feature_account_dividend_payout),
ContextCompat
.getColor(context, R.color.red_light),
),
)
arrayList.add(
CheckboxStatus(
context.getString(R.string.withdrawal),
context.getString(R.string.feature_account_withdrawal),
ContextCompat
.getColor(context, R.color.red_light),
),
)
arrayList.add(
CheckboxStatus(
context.getString(R.string.interest_posting),
context.getString(R.string.feature_account_interest_posting),
ContextCompat.getColor(context, R.color.green_light),
),
)
arrayList.add(
CheckboxStatus(
context.getString(R.string.fee_deduction),
context.getString(R.string.feature_account_fee_deduction),
ContextCompat
.getColor(context, R.color.red_light),
),
)
arrayList.add(
CheckboxStatus(
context.getString(R.string.withdrawal_transfer),
context.getString(R.string.feature_account_withdrawal_transfer),
ContextCompat.getColor(context, R.color.red_light),
),
)
arrayList.add(
CheckboxStatus(
context.getString(R.string.rejected_transfer),
context.getString(R.string.feature_account_rejected_transfer),
ContextCompat.getColor(context, R.color.green_light),
),
)
arrayList.add(
CheckboxStatus(
context.getString(R.string.overdraft_fee),
context.getString(R.string.feature_account_overdraft_fee),
ContextCompat
.getColor(context, R.color.red_light),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class MifosFirebaseMessagingService : FirebaseMessagingService() {
val defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION)
val notificationBuilder = NotificationCompat.Builder(this)
.setSmallIcon(R.mipmap.core_common_mifos_icon)
.setContentTitle(getString(R.string.app_name))
.setContentTitle(getString(R.string.feature_about_app_name))
.setContentText(message)
.setAutoCancel(true)
.setSound(defaultSoundUri)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_lock_black_24dp" />
<item android:drawable="@drawable/feature_auth_lock" />
</layer-list>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_person_black_24dp" />
<item android:drawable="@drawable/feature_auth_ic_person" />
</layer-list>
6 changes: 3 additions & 3 deletions androidApp/src/main/res/layout/activity_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
android:layout_height="@dimen/Mifos.DesignSystem.Size.LogoImageSize"
android:layout_gravity="center_horizontal"
android:layout_marginVertical="@dimen/Mifos.DesignSystem.Size.LogoImageVerticalMargin"
app:srcCompat="@drawable/mifos_logo" />
app:srcCompat="@drawable/feature_auth_mifos_logo" />

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:startIconDrawable="@drawable/ic_person_black_24dp">
app:startIconDrawable="@drawable/feature_auth_ic_person">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_username"
Expand All @@ -41,7 +41,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/Mifos.DesignSystem.Spacing.marginBetweenItemsMedium"
app:passwordToggleEnabled="true"
app:startIconDrawable="@drawable/ic_lock_black_24dp">
app:startIconDrawable="@drawable/feature_auth_lock">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_password"
Expand Down
2 changes: 1 addition & 1 deletion androidApp/src/main/res/layout/fragment_home_old.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
app:border="true"
app:border_width="1dp"
app:shapeAppearance="@dimen/Mifos.DesignSystem.Size.CircularUserImageSize"
tools:src="@drawable/ic_person_black_24dp" />
tools:src="@drawable/feature_auth_ic_person" />

<TextView
android:id="@+id/tv_user_name"
Expand Down
4 changes: 2 additions & 2 deletions androidApp/src/main/res/layout/fragment_home_ui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:visibility="visible"
app:srcCompat="@drawable/ic_person_black_24dp" />
app:srcCompat="@drawable/feature_auth_ic_person" />

<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/iv_circular_user_image"
Expand All @@ -52,7 +52,7 @@
android:clickable="true"
android:visibility="gone"
app:shapeAppearance="@style/Mifos.DesignSystem.Shape.roundedImage"
tools:src="@drawable/ic_person_black_24dp" />
tools:src="@drawable/feature_auth_ic_person" />

<TextView
android:id="@+id/tv_user_name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
style="@style/Mifos.DesignSystem.Components.Button.Outline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/deposit" />
android:text="@string/feature_account_deposit" />

<Button
android:id="@+id/tv_make_a_transfer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
style="@style/Mifos.DesignSystem.Components.Button.Outline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cancel" />
android:text="@string/feature_account_cancel" />

</LinearLayout>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@
android:layout_marginTop="@dimen/margin_10dp"
android:layout_marginBottom="@dimen/margin_16dp"
android:layout_weight="0.5"
android:text="@string/cancel"
android:text="@string/feature_account_cancel"
android:textColor="?attr/colorPrimary"
app:backgroundTint="@color/white" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cancel"
android:text="@string/feature_account_cancel"
android:textColor="?attr/colorPrimary" />

<Button
Expand Down
2 changes: 1 addition & 1 deletion androidApp/src/main/res/layout/nav_drawer_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
android:layout_height="@dimen/Mifos.DesignSystem.Size.BigView"
app:shapeAppearance="@style/Mifos.DesignSystem.Shape.roundedImage"
tools:background="?attr/colorTertiary"
tools:srcCompat="@drawable/ic_person_black_24dp" />
tools:srcCompat="@drawable/feature_auth_ic_person" />

<TextView
android:id="@+id/tv_user_name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/Mifos.DesignSystem.Spacing.marginBetweenItemsMedium"
app:hintAnimationEnabled="false"
app:startIconDrawable="@drawable/ic_lock_black_24dp">
app:startIconDrawable="@drawable/feature_auth_lock">

<EditText
android:id="@+id/et_tenant"
Expand Down
2 changes: 1 addition & 1 deletion androidApp/src/main/res/layout/row_share_account.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/Mifos.DesignSystem.Spacing.marginWords"
android:text="@string/approved" />
android:text="@string/feature_account_approved" />

<TextView
android:id="@+id/tv_shares_approved"
Expand Down
6 changes: 3 additions & 3 deletions androidApp/src/main/res/menu/menu_account.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@
<item
android:id="@+id/menu_filter_savings"
android:icon="@drawable/ic_baseline_filter_list_24"
android:title="@string/savings_account"
android:title="@string/feature_account_savings_account"
android:visible="false"
app:showAsAction="always" />
<item
android:id="@+id/menu_filter_loan"
android:icon="@drawable/ic_baseline_filter_list_24"
android:title="@string/loan_account"
android:title="@string/feature_account_loan_account"
android:visible="false"
app:showAsAction="always" />
<item
android:id="@+id/menu_filter_shares"
android:icon="@drawable/ic_baseline_filter_list_24"
android:title="@string/share_account"
android:title="@string/feature_account_share_account"
android:visible="false"
app:showAsAction="always" />

Expand Down
4 changes: 2 additions & 2 deletions androidApp/src/main/res/menu/menu_nav_drawer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@
<item
android:id="@+id/item_about_us"
android:icon="@drawable/ic_about_us_black_24dp"
android:title="@string/about_us" />
android:title="@string/feature_about_about_us" />
<item
android:id="@+id/item_help"
android:icon="@drawable/ic_help_black_24dp"
android:title="@string/help" />
<item
android:id="@+id/item_share"
android:icon="@drawable/ic_share_black_24dp"
android:title="@string/share" />
android:title="@string/feature_account_share" />
<item
android:id="@+id/item_app_info"
android:icon="@drawable/ic_info_black_24dp"
Expand Down
Loading

0 comments on commit 6c1d871

Please sign in to comment.