Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bookmark is not working in artist_info_page #411

Open
seunggil1 opened this issue Apr 14, 2024 · 4 comments
Open

Bookmark is not working in artist_info_page #411

seunggil1 opened this issue Apr 14, 2024 · 4 comments

Comments

@seunggil1
Copy link

Environment

  • version : 1.31.1
  • platform : Android

Issue

  • Artist Info Page에서 특정 상황에 Bookmark 버튼이 작동하지 않습니다.

Steps to Reproduce

  1. 아무 작품 선택
  2. 작가 눌러서 Artist Info Page 접속
  3. 작품 아무거나 선택해서 읽기
  4. 뒤로 돌아와서 상단 Artist 옆 Bookmark 버튼(하트 버튼 클릭) -> 작동 안됨

Detail Info

  • artist_info_page의 GestureDetector 작동 잘하다가, 작품 조회 이후 작동이 안되는 것 같습니다.
    (디버깅을 할 수는 없어서 그냥 추정중입니다)

Widget nameArea() {
return GestureDetector(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: 28,
height: 28,
child: FlareActor(
'assets/flare/likeUtsua.flr',
animation: isBookmarked ? 'Like' : 'IdleUnlike',
controller: flareController,
),
),
Text(
(widget.isGroup
? 'Groups: '
: widget.isUploader
? 'Uploader: '
: widget.isSeries
? 'Series: '
: widget.isCharacter
? 'Character: '
: 'Artist: ') +
widget.artist,
style:
const TextStyle(fontSize: 20, fontWeight: FontWeight.bold)),
],
),
onTap: () async {
isBookmarked = !isBookmarked;
var type = widget.isGroup
? 1
: widget.isUploader
? 2
: widget.isSeries
? 3
: widget.isCharacter
? 4
: 0;
showToast(
level: ToastLevel.check,
message:
'${widget.artist}${Translations.of(context).trans(isBookmarked ? 'addtobookmark' : 'removetobookmark')}',
);
if (!isBookmarked) {
await (await Bookmark.getInstance())
.unbookmarkArtist(widget.artist, type);
flareController.play('Unlike');
} else {
await (await Bookmark.getInstance())
.bookmarkArtist(widget.artist, type);
flareController.play('Like');

Etc

  • 직장인이라 많은 기여가 힘들지만, 개발 과정에 도움을 드리고 싶은데, 개발을 위해서는 아래 두 파일이 필요합니다.
    server/wsalt.dart, server/wsalt.dart
    api 요청을 위한 v-token, v-valid 정보가 있는 파일로 추정되는데 관련 정보를 제공해주실 수 있으신가요?
    보안 문제로 곤란하시면 편하게 거절해주세요.

감사합니다.

@violet-dev

@TaYaKi71751
Copy link
Contributor

TaYaKi71751 commented Apr 18, 2024

run this on shell :

patch -p1 << EOF
diff --git a/preprocess-android.py b/preprocess-android.py
index 74a339b2..50c94a9e 100644
--- a/preprocess-android.py
+++ b/preprocess-android.py
@@ -108,5 +108,5 @@ for root, subdirs, files in os.walk('./'):
         elif filename.endswith(".yaml"):
             process_yaml(root + '/' +  filename)
 
-# create_dummy_valid('./lib/server/salt.dart')
-# create_dummy_valid('./lib/server/wsalt.dart')
+create_dummy_valid('./lib/server/salt.dart')
+create_dummy_valid('./lib/server/wsalt.dart')
EOF

run this on shell :

python preprocess-android.py

run this after all on shell :

patch -p1 << EOF
diff --git a/preprocess-android.py b/preprocess-android.py
index 74a339b2..50c94a9e 100644
--- a/preprocess-android.py
+++ b/preprocess-android.py
@@ -108,5 +108,5 @@ for root, subdirs, files in os.walk('./'):
         elif filename.endswith(".yaml"):
             process_yaml(root + '/' +  filename)
 
-create_dummy_valid('./lib/server/salt.dart')
-create_dummy_valid('./lib/server/wsalt.dart')
+# create_dummy_valid('./lib/server/salt.dart')
+# create_dummy_valid('./lib/server/wsalt.dart')
EOF

@seunggil1
Copy link
Author

@TaYaKi71751

That's an interesting way to do it, I didn't expect that.
I've got it working now, thanks!

@violet-dev
Copy link
Member

로컬에서 재현이 안되네요 ㅠㅠ

@seunggil1
Copy link
Author

테스트 환경 :
Galaxy S9+ (Android 10)
Xiaomi 13 pro (Android 14)

영상으로 녹화해서 드립니다(터치부분이 표시됩니다)

KakaoTalk_20240507_224029147.mp4

개발환경에서는 오류로 아직 실행을 못하고 있어서, 해결 후에 개발환경에서 한번 테스트 해보겠습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants