diff --git a/app/src/main/java/com/huanchengfly/tieba/post/api/models/Profile.kt b/app/src/main/java/com/huanchengfly/tieba/post/api/models/Profile.kt index d4df135f..662686fb 100644 --- a/app/src/main/java/com/huanchengfly/tieba/post/api/models/Profile.kt +++ b/app/src/main/java/com/huanchengfly/tieba/post/api/models/Profile.kt @@ -13,22 +13,11 @@ data class Profile( val blockInfo: BlockInfo, @SerializedName("error_code") val errorCode: String, - @SerializedName("is_black_white") - val isBlackWhite: String, - @SerializedName("mask_type") - val maskType: String, @SerializedName("nickname_info") val nicknameInfo: NicknameInfo, - @SerializedName("server_time") - val serverTime: String, - val uk: String, - @SerializedName("url_map") - val urlMap: List, val user: User, @SerializedName("user_agree_info") - val userAgreeInfo: UserAgreeInfo, - @SerializedName("video_channel_info") - val videoChannelInfo: VideoChannelInfo, + val userAgreeInfo: UserAgreeInfo ) { @Keep data class Anti( @@ -74,12 +63,6 @@ data class Profile( @Keep data class User( - @SerializedName("ala_info") - val alaInfo: AlaInfo, - @SerializedName("baijiahao_info") - val baijiahaoInfo: BaijiahaoInfo, - @SerializedName("bazhu_grade") - val bazhuGrade: String, @SerializedName("bg_pic") val bgPic: String, @SerializedName("birthday_info") @@ -88,16 +71,10 @@ data class Profile( val bookmarkCount: String, @SerializedName("bookmark_new_count") val bookmarkNewCount: String, - @SerializedName("business_account_info") - val businessAccountInfo: BusinessAccountInfo, - @SerializedName("call_fans_info") - val callFansInfo: CallFansInfo, @SerializedName("can_modify_avatar") val canModifyAvatar: String, @SerializedName("concern_num") val concernNum: String, - @SerializedName("consume_info") - val consumeInfo: List, @SerializedName("creation_data") val creationData: CreationData, @SerializedName("display_auth_type") @@ -112,19 +89,12 @@ data class Profile( val favoriteNum: String, @SerializedName("friend_num") val friendNum: String, - @SerializedName("gift_list") - val giftList: List, @SerializedName("gift_num") val giftNum: String, - val groupList: List, - @SerializedName("has_bottle_enter") - val hasBottleEnter: String, - @SerializedName("has_concerned") - val hasConcerned: String, val id: String, var intro: String?, @SerializedName("ip_address") - val ipAddress: String, + val ipAddress: String?, @SerializedName("is_default_avatar") val isDefaultAvatar: String, @SerializedName("is_fans") @@ -137,13 +107,9 @@ data class Profile( val isMem: String, @SerializedName("is_nickname_editing") val isNicknameEditing: String, - @SerializedName("is_show_redpacket") - val isShowRedpacket: String, val likeForum: List, @SerializedName("like_forum_num") val likeForumNum: String, - @SerializedName("live_room_info") - val liveRoomInfo: List, @SerializedName("modify_avatar_desc") val modifyAvatarDesc: String, @SerializedName("my_like_num") @@ -151,17 +117,6 @@ data class Profile( val name: String, @SerializedName("name_show") val nameShow: String, - @SerializedName("new_god_data") - val newGodData: NewGodData, - @SerializedName("new_icon_url") - val newIconUrl: List, - @SerializedName("new_tshow_icon") - val newTshowIcon: List, - @SerializedName("outer_id") - val outerId: String, - @SerializedName("pay_member_info") - val payMemberInfo: PayMemberInfo, - val pendant: List, val portrait: String, val portraith: String, @SerializedName("post_num") @@ -177,64 +132,19 @@ data class Profile( val sex: String, @SerializedName("tb_age") val tbAge: String, - @SerializedName("tb_vip") - val tbVip: List, - @SerializedName("theme_card") - val themeCard: List, @SerializedName("thread_num") val threadNum: String, @SerializedName("total_agree_num") val totalAgreeNum: String, @SerializedName("total_visitor_num") val totalVisitorNum: String, - @SerializedName("tshow_icon") - val tshowIcon: List, - @SerializedName("tw_anchor_info") - val twAnchorInfo: TwAnchorInfo, @SerializedName("user_growth") val userGrowth: UserGrowth, @SerializedName("user_pics") val userPics: List, - @SerializedName("vip_close_ad") - val vipCloseAd: VipCloseAd, - val vipInfo: VipInfo, - @SerializedName("vip_show_info") - val vipShowInfo: VipShowInfo, - @SerializedName("virtual_image_info") - val virtualImageInfo: VirtualImageInfo, @SerializedName("visitor_num") val visitorNum: String, - @SerializedName("work_creator_info") - val workCreatorInfo: String ) { - @Keep - data class AlaInfo( - @SerializedName("ala_id") - val alaId: String, - @SerializedName("level_exp") - val levelExp: String, - @SerializedName("level_id") - val levelId: String, - @SerializedName("live_id") - val liveId: String, - @SerializedName("live_status") - val liveStatus: String, - @SerializedName("verify_info_status") - val verifyInfoStatus: String - ) - - @Keep - data class BaijiahaoInfo( - @SerializedName("auth_desc") - val authDesc: String, - @SerializedName("auth_id") - val authId: String, - val avatar: String, - @SerializedName("avatar_h") - val avatarH: String, - val brief: String, - val name: String - ) @Keep data class BirthdayInfo( @@ -246,22 +156,6 @@ data class Profile( val constellation: String ) - @Keep - data class BusinessAccountInfo( - @SerializedName("business_name") - val businessName: String, - @SerializedName("identifi_explain") - val identifiExplain: String, - @SerializedName("is_business_account") - val isBusinessAccount: String - ) - - @Keep - data class CallFansInfo( - @SerializedName("can_call") - val canCall: String - ) - @Keep data class CreationData( @SerializedName("agree_count") @@ -286,45 +180,6 @@ data class Profile( val forumName: String ) - @Keep - data class NewGodData( - @SerializedName("field_id") - val fieldId: String - ) - - @Keep - data class ParrScores( - @SerializedName("i_money") - val iMoney: String, - @SerializedName("i_other") - val iOther: String, - @SerializedName("i_total") - val iTotal: String, - val level: String, - val limit: String, - @SerializedName("scores_fetch") - val scoresFetch: String, - @SerializedName("scores_money") - val scoresMoney: String, - @SerializedName("scores_other") - val scoresOther: String, - @SerializedName("scores_total") - val scoresTotal: String, - @SerializedName("update_time") - val updateTime: String - ) - - @Keep - data class PayMemberInfo( - @SerializedName("end_time") - val endTime: String, - @SerializedName("expire_remind") - val expireRemind: String, - @SerializedName("props_id") - val propsId: String, - val url: String - ) - @Keep data class PrivSets( @SerializedName("bazhu_show_inside") @@ -340,27 +195,6 @@ data class Profile( val reply: String ) - @Keep - data class TwAnchorInfo( - @SerializedName("anchor_level") - val anchorLevel: String, - @SerializedName("caller_msg") - val callerMsg: String, - @SerializedName("fans_num") - val fansNum: String, - val follow: String, - @SerializedName("gifts_num") - val giftsNum: String, - val guide: String, - @SerializedName("in_black_list") - val inBlackList: String, - @SerializedName("month_update_days") - val monthUpdateDays: String, - val newfloor: String, - @SerializedName("set_cover") - val setCover: String - ) - @Keep data class UserGrowth( @SerializedName("level_id") @@ -368,8 +202,6 @@ data class Profile( val score: String, @SerializedName("target_score") val targetScore: String, - @SerializedName("task_info") - val taskInfo: List, val tmoney: String ) @@ -378,81 +210,6 @@ data class Profile( val big: String, val small: String ) - - @Keep - data class VipCloseAd( - @SerializedName("forum_close") - val forumClose: List, - @SerializedName("is_open") - val isOpen: String, - @SerializedName("vip_close") - val vipClose: String - ) - - @Keep - data class VipInfo( - @SerializedName("a_score") - val aScore: String, - @SerializedName("e_time") - val eTime: String, - @SerializedName("ext_score") - val extScore: String, - @SerializedName("icon_url") - val iconUrl: String, - @SerializedName("n_score") - val nScore: String, - @SerializedName("s_time") - val sTime: String, - @SerializedName("v_level") - val vLevel: String, - @SerializedName("v_status") - val vStatus: String - ) - - @Keep - data class VipShowInfo( - val content: String, - val link: String, - val title: String, - @SerializedName("vip_icon") - val vipIcon: String - ) - - @Keep - data class VirtualImageInfo( - @SerializedName("allow_customize") - val allowCustomize: String, - @SerializedName("image_agree_count") - val imageAgreeCount: String, - @SerializedName("is_allow_agree") - val isAllowAgree: String, - @SerializedName("is_background_firstly") - val isBackgroundFirstly: String, - @SerializedName("is_display") - val isDisplay: String, - @SerializedName("isset_virtual_image") - val issetVirtualImage: String, - @SerializedName("personal_state") - val personalState: List, - @SerializedName("recent_incr_agree") - val recentIncrAgree: String, - @SerializedName("snapshoot_id") - val snapshootId: String, - @SerializedName("state_list") - val stateList: List, - @SerializedName("virtual_background") - val virtualBackground: String, - @SerializedName("virtual_background_type") - val virtualBackgroundType: String, - @SerializedName("virtual_image_url") - val virtualImageUrl: String - ) { - @Keep - data class State( - val icon: String, - val text: String - ) - } } @Keep @@ -460,12 +217,4 @@ data class Profile( @SerializedName("total_agree_num") val totalAgreeNum: String ) - - @Keep - data class VideoChannelInfo( - @SerializedName("follow_channel") - val followChannel: String, - @SerializedName("man_channel") - val manChannel: String - ) } \ No newline at end of file diff --git a/app/src/main/java/com/huanchengfly/tieba/post/fragments/PhotoViewFragment.java b/app/src/main/java/com/huanchengfly/tieba/post/fragments/PhotoViewFragment.java index cae9c075..4a752b8c 100644 --- a/app/src/main/java/com/huanchengfly/tieba/post/fragments/PhotoViewFragment.java +++ b/app/src/main/java/com/huanchengfly/tieba/post/fragments/PhotoViewFragment.java @@ -127,7 +127,7 @@ public class PhotoViewFragment extends BaseFragment { @Override public void onImageLoaded() { - view.setDoubleTapZoomDpi(160); + view.setDoubleTapZoomDpi(120); view.setDoubleTapZoomDuration(200); view.setDoubleTapZoomStyle(SubsamplingScaleImageView.ZOOM_FOCUS_FIXED); view.setQuickScaleEnabled(false); diff --git a/app/src/main/java/com/huanchengfly/tieba/post/widgets/theme/TintFloorMaterialCardView.java b/app/src/main/java/com/huanchengfly/tieba/post/widgets/theme/TintFloorMaterialCardView.java index 4b9bf6cb..d011f258 100644 --- a/app/src/main/java/com/huanchengfly/tieba/post/widgets/theme/TintFloorMaterialCardView.java +++ b/app/src/main/java/com/huanchengfly/tieba/post/widgets/theme/TintFloorMaterialCardView.java @@ -67,17 +67,10 @@ public class TintFloorMaterialCardView extends MaterialCardView implements Tinta Method method = Class.forName("com.google.android.material.card.MaterialCardViewHelper").getDeclaredMethod("setCardBackgroundColor", ColorStateList.class); method.setAccessible(true); method.invoke(field.get(this), ColorStateList.valueOf(bg)); - } catch (NoSuchFieldException e) { - e.printStackTrace(); - } catch (ClassNotFoundException e) { - e.printStackTrace(); - } catch (NoSuchMethodException e) { - e.printStackTrace(); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } catch (InvocationTargetException e) { + } catch (NoSuchFieldException | ClassNotFoundException | NoSuchMethodException | IllegalAccessException | InvocationTargetException e) { e.printStackTrace(); } + setCardBackgroundColor(bg); setStrokeColor(ThemeUtils.getColorById(getContext(), R.color.default_color_divider)); /* setCardBackgroundColor(ThemeUtils.getColorById(getContext(), mBackgroundTintResId)); diff --git a/app/src/main/java/com/huanchengfly/tieba/post/widgets/theme/TintMaterialCardView.java b/app/src/main/java/com/huanchengfly/tieba/post/widgets/theme/TintMaterialCardView.java index f21d2e86..d01becde 100644 --- a/app/src/main/java/com/huanchengfly/tieba/post/widgets/theme/TintMaterialCardView.java +++ b/app/src/main/java/com/huanchengfly/tieba/post/widgets/theme/TintMaterialCardView.java @@ -2,7 +2,6 @@ package com.huanchengfly.tieba.post.widgets.theme; import android.annotation.SuppressLint; import android.content.Context; -import android.content.res.ColorStateList; import android.util.AttributeSet; import androidx.annotation.NonNull; @@ -13,10 +12,6 @@ import com.huanchengfly.tieba.post.R; import com.huanchengfly.tieba.post.ui.common.theme.interfaces.Tintable; import com.huanchengfly.tieba.post.ui.common.theme.utils.ThemeUtils; -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - @SuppressLint("CustomViewStyleable") public class TintMaterialCardView extends MaterialCardView implements Tintable { private static final String TAG = "TintMaterialCardView"; @@ -61,15 +56,7 @@ public class TintMaterialCardView extends MaterialCardView implements Tintable { private void applyTintColor() { //int bg = ThemeUtils.getColorById(getContext(), mBackgroundTintResId); int bg = ThemeUtils.getColorById(getContext(), R.color.default_color_card); - try { - Field field = Class.forName("com.google.android.material.card.MaterialCardView").getDeclaredField("cardViewHelper"); - field.setAccessible(true); - Method method = Class.forName("com.google.android.material.card.MaterialCardViewHelper").getDeclaredMethod("setCardBackgroundColor", ColorStateList.class); - method.setAccessible(true); - method.invoke(field.get(this), ColorStateList.valueOf(bg)); - } catch (NoSuchFieldException | ClassNotFoundException | NoSuchMethodException | IllegalAccessException | InvocationTargetException e) { - e.printStackTrace(); - } + setCardBackgroundColor(bg); setStrokeColor(ThemeUtils.getColorById(getContext(), R.color.default_color_divider)); /* setCardBackgroundColor(ThemeUtils.getColorById(getContext(), mBackgroundTintResId));