Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
72f883b3
Commit
72f883b3
authored
May 05, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复BUG:17439。
parent
74a96c87
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletions
+27
-1
dynamicFocusEvent.kt
m-dynamic/src/main/java/com/yidianling/dynamic/event/dynamicFocusEvent.kt
+6
-0
MembersActivity.java
m-dynamic/src/main/java/com/yidianling/dynamic/members/MembersActivity.java
+5
-0
TrendsDetailActivity.java
m-dynamic/src/main/java/com/yidianling/dynamic/trendsDetail/TrendsDetailActivity.java
+16
-1
No files found.
m-dynamic/src/main/java/com/yidianling/dynamic/event/dynamicFocusEvent.kt
0 → 100644
View file @
72f883b3
package
com.yidianling.dynamic.event
data class
dynamicFocusEvent
(
var
focusState
:
String
)
\ No newline at end of file
m-dynamic/src/main/java/com/yidianling/dynamic/members/MembersActivity.java
View file @
72f883b3
...
...
@@ -42,6 +42,7 @@ import com.yidianling.dynamic.common.net.DynamicApiUtils;
import
com.yidianling.dynamic.dialog.CancelFocusDialog
;
import
com.yidianling.dynamic.event.BlackEvent
;
import
com.yidianling.dynamic.event.LoginStateEvent
;
import
com.yidianling.dynamic.event.dynamicFocusEvent
;
import
com.yidianling.dynamic.model.Command
;
import
com.yidianling.dynamic.model.MemberInfoBean
;
import
com.yidianling.dynamic.router.DynamicIn
;
...
...
@@ -433,7 +434,9 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
/**
*
*/
@SuppressLint
(
"CheckResult"
)
private
void
Focus
()
{
showProgressDialog
(
""
);
Command
.
FocusCmd
cmd
=
new
Command
.
FocusCmd
(
mem_id
,
"1"
);
DynamicApiUtils
.
focus
(
cmd
)
...
...
@@ -450,6 +453,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
fans_count
=
(
fans_counti
+
1
)
+
""
;
members_top_user_fensi_num_tv
.
setText
(
"粉丝 "
+
fans_count
);
focus_state
=
"1"
;
EventBus
.
getDefault
().
post
(
new
dynamicFocusEvent
(
focus_state
));
Drawable
drawable
=
getResources
().
getDrawable
(
R
.
drawable
.
dynamic_ic_expand
);
drawable
.
setBounds
(
0
,
0
,
drawable
.
getMinimumWidth
(),
drawable
.
getMinimumHeight
());
members_top_user_focus_ortion_tv
.
setCompoundDrawablePadding
(
20
);
...
...
@@ -461,6 +465,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
fans_count
=
(
fans_counti
-
1
)
+
""
;
members_top_user_fensi_num_tv
.
setText
(
"粉丝 "
+
fans_count
);
focus_state
=
"2"
;
EventBus
.
getDefault
().
post
(
new
dynamicFocusEvent
(
focus_state
));
members_top_user_focus_ortion_tv
.
setCompoundDrawables
(
null
,
null
,
null
,
null
);
members_top_user_focus_ortion_tv
.
setText
(
"+ 关注"
);
members_top_user_focus_ortion_tv
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
dynamic_white
));
...
...
m-dynamic/src/main/java/com/yidianling/dynamic/trendsDetail/TrendsDetailActivity.java
View file @
72f883b3
...
...
@@ -24,6 +24,7 @@ import android.text.Html;
import
android.text.TextUtils
;
import
android.text.TextWatcher
;
import
android.text.style.ImageSpan
;
import
android.util.EventLog
;
import
android.view.KeyEvent
;
import
android.view.MotionEvent
;
import
android.view.View
;
...
...
@@ -72,6 +73,8 @@ import com.yidianling.dynamic.R2;
import
com.yidianling.dynamic.common.browsePictures.BrowsePicturesActivity2
;
import
com.yidianling.dynamic.common.emoji.EmoticonPickerView
;
import
com.yidianling.dynamic.common.emoji.IEmoticonSelectedListener
;
import
com.yidianling.dynamic.event.LoginStateEvent
;
import
com.yidianling.dynamic.event.dynamicFocusEvent
;
import
com.yidianling.dynamic.members.MembersActivity
;
import
com.yidianling.dynamic.model.CommentBean
;
import
com.yidianling.dynamic.model.Reply
;
...
...
@@ -95,6 +98,7 @@ import java.util.concurrent.TimeUnit;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
import
de.greenrobot.event.EventBus
;
import
io.reactivex.Observable
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.disposables.Disposable
;
...
...
@@ -374,6 +378,7 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
EventBus
.
getDefault
().
register
(
this
);
setContentView
(
R
.
layout
.
dynamic_activity_trend_details
);
ButterKnife
.
bind
(
this
);
initDatas
();
...
...
@@ -1451,8 +1456,18 @@ public class TrendsDetailActivity extends BaseMvpActivity<ITrendsDetailView, ITr
if
(
subscribe
!=
null
)
{
subscribe
.
dispose
();
}
EventBus
.
getDefault
().
unregister
(
this
);
}
public
void
onEvent
(
dynamicFocusEvent
event
)
{
// 1已关注 2关注
if
(
event
.
getFocusState
().
equals
(
"1"
)){
tvGuanzhu
.
setVisibility
(
GONE
);
tvGuanzhu
.
setText
(
"已关注"
);
}
else
{
tvGuanzhu
.
setVisibility
(
VISIBLE
);
tvGuanzhu
.
setText
(
"关注"
);
}
}
@NonNull
@Override
public
ITrendsDetailPresenterImpl
createPresenter
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment