diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts
index 251fd6a..6f2d627 100644
--- a/android/app/build.gradle.kts
+++ b/android/app/build.gradle.kts
@@ -19,8 +19,8 @@ android {
applicationId = "app.priceguard"
minSdk = 29
targetSdk = 34
- versionCode = 5
- versionName = "0.3.1"
+ versionCode = 6
+ versionName = "0.3.2"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
diff --git a/android/app/src/main/java/app/priceguard/ui/additem/setprice/SetTargetPriceFragment.kt b/android/app/src/main/java/app/priceguard/ui/additem/setprice/SetTargetPriceFragment.kt
index aa7e39b..b3889e3 100644
--- a/android/app/src/main/java/app/priceguard/ui/additem/setprice/SetTargetPriceFragment.kt
+++ b/android/app/src/main/java/app/priceguard/ui/additem/setprice/SetTargetPriceFragment.kt
@@ -156,7 +156,7 @@ class SetTargetPriceFragment : Fragment() {
showDialogWithAction(
getString(R.string.success_add),
getString(R.string.success_add_message),
- DialogConfirmAction.FINISH
+ DialogConfirmAction.HOME
)
}
@@ -174,7 +174,7 @@ class SetTargetPriceFragment : Fragment() {
showDialogWithAction(
getString(R.string.error_add_product),
getString(R.string.exist_product),
- DialogConfirmAction.FINISH
+ DialogConfirmAction.HOME
)
}
diff --git a/android/app/src/main/java/app/priceguard/ui/data/DialogConfirmAction.kt b/android/app/src/main/java/app/priceguard/ui/data/DialogConfirmAction.kt
index 18de82e..59455a9 100644
--- a/android/app/src/main/java/app/priceguard/ui/data/DialogConfirmAction.kt
+++ b/android/app/src/main/java/app/priceguard/ui/data/DialogConfirmAction.kt
@@ -3,5 +3,6 @@ package app.priceguard.ui.data
enum class DialogConfirmAction {
NOTHING,
FINISH,
+ HOME,
CUSTOM
}
diff --git a/android/app/src/main/java/app/priceguard/ui/util/ConfirmDialogFragment.kt b/android/app/src/main/java/app/priceguard/ui/util/ConfirmDialogFragment.kt
index fdd309e..f68a051 100644
--- a/android/app/src/main/java/app/priceguard/ui/util/ConfirmDialogFragment.kt
+++ b/android/app/src/main/java/app/priceguard/ui/util/ConfirmDialogFragment.kt
@@ -1,10 +1,12 @@
package app.priceguard.ui.util
import android.app.Dialog
+import android.content.Intent
import android.os.Bundle
import androidx.fragment.app.DialogFragment
import app.priceguard.R
import app.priceguard.ui.data.DialogConfirmAction
+import app.priceguard.ui.home.HomeActivity
import com.google.android.material.dialog.MaterialAlertDialogBuilder
class ConfirmDialogFragment : DialogFragment() {
@@ -36,6 +38,10 @@ class ConfirmDialogFragment : DialogFragment() {
resultListener?.onDialogResult(true)
}
+ DialogConfirmAction.HOME -> {
+ goToHomeActivity()
+ }
+
DialogConfirmAction.NOTHING -> {}
}
dismiss()
@@ -61,6 +67,16 @@ class ConfirmDialogFragment : DialogFragment() {
}
}
+ private fun goToHomeActivity() {
+ val activityIntent = requireActivity().intent
+ if (activityIntent?.action == Intent.ACTION_SEND) {
+ val intent = Intent(requireActivity(), HomeActivity::class.java)
+ intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
+ startActivity(intent)
+ }
+ requireActivity().finish()
+ }
+
override fun onStart() {
super.onStart()
diff --git a/android/app/src/main/res/layout-land/activity_intro.xml b/android/app/src/main/res/layout-land/activity_intro.xml
deleted file mode 100644
index c555fdf..0000000
--- a/android/app/src/main/res/layout-land/activity_intro.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/app/src/main/res/layout-land/activity_login.xml b/android/app/src/main/res/layout-land/activity_login.xml
deleted file mode 100644
index fba714a..0000000
--- a/android/app/src/main/res/layout-land/activity_login.xml
+++ /dev/null
@@ -1,153 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/app/src/main/res/layout/activity_intro.xml b/android/app/src/main/res/layout/activity_intro.xml
index d820ac9..9310558 100644
--- a/android/app/src/main/res/layout/activity_intro.xml
+++ b/android/app/src/main/res/layout/activity_intro.xml
@@ -3,68 +3,81 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
-
+ android:fillViewport="true">
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
\ No newline at end of file
diff --git a/android/app/src/main/res/layout/activity_login.xml b/android/app/src/main/res/layout/activity_login.xml
index f13864e..ee1b040 100644
--- a/android/app/src/main/res/layout/activity_login.xml
+++ b/android/app/src/main/res/layout/activity_login.xml
@@ -9,134 +9,157 @@
type="app.priceguard.ui.login.LoginViewModel" />
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
+ app:layout_constraintEnd_toEndOf="@id/gl_vertical_end"
+ app:layout_constraintStart_toStartOf="@id/gl_vertical_start"
+ app:layout_constraintTop_toTopOf="parent">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/android/app/src/main/res/layout/fragment_my_page.xml b/android/app/src/main/res/layout/fragment_my_page.xml
index d9cc721..9103b2c 100644
--- a/android/app/src/main/res/layout/fragment_my_page.xml
+++ b/android/app/src/main/res/layout/fragment_my_page.xml
@@ -54,9 +54,9 @@
android:id="@+id/view_my_page_background"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:minHeight="80dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="24dp"
+ android:minHeight="80dp"
app:cardBackgroundColor="?attr/colorSurfaceContainerHighest"
app:cardCornerRadius="12dp"
app:cardElevation="0dp"
@@ -98,13 +98,17 @@
diff --git a/android/release_notes.txt b/android/release_notes.txt
index 4da1a62..f78a227 100644
--- a/android/release_notes.txt
+++ b/android/release_notes.txt
@@ -1,28 +1,9 @@
December 12, 2023
-v0.3.1
-
-π Feature Updates
-
-- System Navigation Bar μμλ ν
λ§μ λ°λκ²λ μμ
-- μν μμΈ νλ©΄μμ Graph μμμ΄ μΈλ‘λ‘ μ¬λΌμ΄λν κ²½μ° μ€ν¬λ‘€ μμμ μ μ©λλλ‘ λ³κ²½ (μ΄μ λΆν°λ κΈΈκ² λλ₯Ό μ κ·Έλν λΌλ²¨μ΄ νμ±νλ©λλ€)
-- μΌλΆ νμ΄μ§μμ μ κ·Όμ± κ°μ
+v0.3.2
π§ Bug Fixes
-- μν λͺ©λ‘ νλ©΄μμ μλ¦Ό ν κΈμ κ»λ€κ° μΌ°μλ νμ±ν μνμμ κΊΌμ§ μνμ μμ΄μ½μ΄ λ¨λ μ€λ₯ μμ
-- μν λͺ©λ‘ νλ©΄μμ νλ©΄μ ν κΈκ°μ λ³κ²½ν ν, μλ‘κ³ μΉ¨μ νμλ μλλλ‘ λμμ€λ λ¬Έμ μμ
-- λ‘λ©μ€μΌλ μν μμΈ νλ©΄μμ λ²νΌλ€ λΉνμ±ν
-- Dynamic Themeμ μ§μνμ§ μλ OSμ κ²½μ° ν΄λΉ ν
λ§ μ€μ View λΉνμ±ν
-- μν, μν μΆμ² λͺ©λ‘ μ νμ μ€ν¬λ‘€ / λΉκ²¨μ μλ‘κ³ μΉ¨ μ€λ₯ μμ
-- νλ©΄ νμ μ λ€μ΄μΌλ‘κ·Έκ° μ¬λΌμ§λ νμ μμ
-- μν μμΈ νμ΄μ§μμ νλ©΄ νμ μ Scroll Stateκ° μ΄κΈ°νλλ νμ μμ
-- λͺ¨λ νμ΄μ§μμ λ²νΌ μ°μ μ
λ ₯ λ°©μ§ μ²λ¦¬
-- λͺ¨λ νμ΄μ§μμ λ©λͺ¨λ¦¬ λμκ° μΌμ΄λλ μΌλΆ νλͺ©λ€ μμ
-- μμ€ν
κΈκΌ΄μ ν€μ μλ UIκ° κΉ¨μ§λ λ¬Έμ μμ
-- ν
λ§ λ³κ²½ ν μ± μ¬μμ μ ν
λ§ λ³κ²½μ΄ μλλ μ€λ₯ μμ
-- λͺ©ν κ°κ²© μμ μ κ°κ²© μμ νλ©΄ μ΄κΈ° κ° κΈ°μ‘΄ λͺ©ν κ°κ²©μΌλ‘ μμ
-- λ΄ μ 보 νμ΄μ§μμ μ΄λ¦μ λ¬Έμλ§ λμ¬ μ μλλ‘ μμ
-
-
-Material Chart Changelog: https://github.com/Taewan-P/material-android-chart/releases/tag/v0.2.0
-
+- 곡μ νκΈ°λ‘ μν λ±λ‘ μλ£ ν μ±μ΄ κΊΌμ§λ νμ μμ
+- μν μ€λ³΅ λ±λ‘ μ ν νλ©΄μΌλ‘ λμκ°λλ‘ μμ
+- μν μμ μ μμΈνλ©΄μΌλ‘ λμκ°λλ‘ μμ
+- μμνλ©΄, λ‘κ·ΈμΈ νλ©΄μμ κΈμ¨ ν¬κΈ° μ΄κ³Ό μ ν
μ€νΈ ν¬κΈ° μλ μ‘°μ
diff --git a/backend/src/cache/cache.service.ts b/backend/src/cache/cache.service.ts
index 3111790..60c6119 100644
--- a/backend/src/cache/cache.service.ts
+++ b/backend/src/cache/cache.service.ts
@@ -1,6 +1,6 @@
import { Injectable } from '@nestjs/common';
import { ProductRankCache } from './rank.cache';
-import { MAX_TRACKING_PRODUCT_CACHE, MAX_TRACKING_RANK, TWENTY_MIN_TO_SEC } from 'src/constants';
+import { MAX_TRACKING_PRODUCT_CACHE, MAX_TRACKING_RANK } from 'src/constants';
import { TrackingProductCache } from './tracking.cache';
import { InjectRepository } from '@nestjs/typeorm';
import Redis from 'ioredis';
@@ -57,8 +57,6 @@ export class CacheService {
price: data.price,
lowestPrice: data.lowestPrice,
}),
- 'EX',
- TWENTY_MIN_TO_SEC,
);
const zaddUserCount = await this.redis.zadd(
'userCount',
diff --git a/backend/src/constants.ts b/backend/src/constants.ts
index e5c0283..e753d08 100644
--- a/backend/src/constants.ts
+++ b/backend/src/constants.ts
@@ -38,4 +38,4 @@ export const CHANNEL_ID = process.env.CHANNEL_ID;
export const TWENTY_MIN_TO_SEC = 20 * 60;
export const TWO_WEEKS_TO_SEC = 2 * 7 * 24 * 60 * 60;
export const TWO_MONTHS_TO_SEC = 61 * 24 * 60 * 60;
-export const MAX_TRACKING_PRODUCT_CACHE = 30;
+export const MAX_TRACKING_PRODUCT_CACHE = parseInt(process.env.MAX_TRACKING_PRODUCT_CACHE || '30');
diff --git a/backend/src/product/product.service.ts b/backend/src/product/product.service.ts
index 136730e..8e3dce2 100644
--- a/backend/src/product/product.service.ts
+++ b/backend/src/product/product.service.ts
@@ -31,53 +31,7 @@ export class ProductService {
private productPriceModel: Model,
@InjectRedis() private readonly redis: Redis,
private cacheService: CacheService,
- ) {
- this.initCache();
- }
-
- async initCache() {
- const latestData = await this.productPriceModel
- .aggregate([
- {
- $sort: { time: -1 },
- },
- {
- $group: {
- _id: '$productId',
- price: { $first: '$price' },
- isSoldOut: { $first: '$isSoldOut' },
- lowestPrice: { $min: '$price' },
- },
- },
- ])
- .sort('_id')
- .exec();
- const userCountList = await this.trackingProductRepository.getAllUserCount();
- const rankList = await this.productRepository.getTotalInfoRankingList();
- const initPromise = latestData.map(async (data) => {
- const matchProduct = userCountList.find((product) => product.id === data._id);
- const setUserCount = await this.redis.set(
- `product:${data._id}`,
- JSON.stringify({
- isSoldOut: data.isSoldOut,
- price: data.price,
- lowestPrice: data.lowestPrice,
- }),
- 'EX',
- TWENTY_MIN_TO_SEC,
- );
- const zaddUserCount = await this.redis.zadd(
- 'userCount',
- matchProduct ? parseInt(matchProduct.userCount) : 0,
- data._id,
- );
- return Promise.all([setUserCount, zaddUserCount]);
- });
- rankList.forEach((product) => {
- this.cacheService.putProductRank(product.id, { ...product, userCount: parseInt(product.userCount) });
- });
- await Promise.all(initPromise);
- }
+ ) {}
async verifyUrl(productUrlDto: ProductUrlDto): Promise {
const { productUrl } = productUrlDto;