Skip to content

Commit 80dbe26

Browse files
committed
添加个人中心、完成头像修改
1 parent c05d021 commit 80dbe26

File tree

100 files changed

+1936
-294
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+1936
-294
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ android {
3737
debug {
3838
minifyEnabled false
3939
debuggable true
40-
// applicationIdSuffix '.debug'
40+
applicationIdSuffix '.debug'
4141
signingConfig signingConfigs.release
4242
}
4343
release {

app/src/main/java/com/rae/cnblogs/MainActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ protected void onCreate(Bundle savedInstanceState) {
7070
*/
7171
protected void debugLogin() {
7272
String url = "cnblogs.com";
73-
String cookie = "28E6D1BBA89ACB6EE5DF550A5F2054E76A60D2CE55F92465A59263AC78952CE9B5AB276BC6B26E68CAE5C096EFD9082817D5EC1951483E1420B549BAEE5EC5B2B46CAC4347CD603B1D1FEE1CBE114D39C96FA883";
74-
String netCoreCookie = "CfDJ8KlpyPucjmhMuZTmH8oiYTNaViYaV05_zR2tme3N70DGDNqd5eFXK6QQWXD1FauprFJW5aNb-L6BzuH1SYrbbAqCXMB8zmMHaZW7k5AiHFDpdR9TjeAmDUed7cI-EleHMOOI3101hNBpTNPMd-j8J5SMG_yhdbF2_l4eonHptfrGjykx_mVaulTqQZEMKvgzpLYLNX3pilu5Aho578YmJQIY3v8046QY3yLbLNhhnqmb2J78QMdHv06B4kNJHiy5olgfuxHOkzB2xUzVI6FrI8KfOiImmw1dxg5mep_ebVaz";
73+
String cookie = "11B528DB7F5E022881E9F70D32BE8D8540AB21983EC066382DC249936504C7C8FB5EB3F1FD0014012312C979995AC47BDB220100703D8472D68057541F4B16DFD91065F3220D9837F0B3D466EC5ECB0B80BBB9E4";
74+
String netCoreCookie = "CfDJ8KlpyPucjmhMuZTmH8oiYTNaBH4om7c7dgJVL5t0RltPPTKGvV6OTQ-OaF4wPzKJ455kTewvBOISWzDqEmX4qmEq7p4dbqXtZUM0JhOnb03_SiTRW_sWt8XzWNcALVKejodRAB_VCt1Ov9r2fWcgSLJrqVI13-FE2pPsoaKvgwRM5ci4nMQcWkA_6uV902omobjRsWrtQUPdcu_8sNiEmjIXWU6dZM1M0In4HDIQ880758xpo55gbepN-20DXB-p0TuSOydcYZKqnF8ncgKD_7CmJeOegbffeG1oat0XOQ28rxzTq4NhxiY_NQcva6PwmQ";
7575
CookieManager cookieManager = CookieManager.getInstance();
7676
cookieManager.removeAllCookie();
7777
cookieManager.setCookie(url, ".CNBlogsCookie=" + cookie + "; domain=.cnblogs.com; path=/; HttpOnly");

module-basic/src/main/java/com/rae/cnblogs/basic/BasicPresenter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,5 @@ public LifecycleProvider getLifecycleProvider() {
6767
return mLifecycleProvider;
6868
}
6969

70+
7071
}

module-blog/src/main/java/com/rae/cnblogs/blog/BloggerActivity.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,10 @@ public void onLoadBloggerInfo(final FriendsInfoBean userInfo) {
199199
if (!TextUtils.isEmpty(userInfo.getIntroduce())) {
200200
mIntroduceView.setText(userInfo.getIntroduce());
201201
}
202-
if (!TextUtils.isEmpty(userInfo.getSnsAge())) {
203-
mSnsAgeView.setText(userInfo.getSnsAge());
202+
203+
// 园龄
204+
if (!TextUtils.isEmpty(userInfo.getJoinDate())) {
205+
mSnsAgeView.setText(userInfo.getJoinDate());
204206
}
205207

206208
// 如果是自己,则隐藏关注按钮

module-blog/src/main/java/com/rae/cnblogs/blog/adapter/BlogHomeFragmentAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ public int getItemPosition(@NonNull Object object) {
4141
public Fragment getItem(int position) {
4242
CategoryBean m = mDataList.get(position);
4343
if (TextUtils.equals("news", m.getType()))
44-
return NewsListFragment.newInstance();
44+
return NewsListFragment.newInstance(m);
4545
if (TextUtils.equals("kb", m.getType()))
46-
return KbListFragment.newInstance();
46+
return KbListFragment.newInstance(m);
4747
return MultipleTypeBlogListFragment.newInstance(m);
4848
}
4949

module-blog/src/main/java/com/rae/cnblogs/blog/detail/BlogDetailPresenterImpl.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import android.support.annotation.Nullable;
77
import android.text.TextUtils;
88

9+
import com.rae.cnblogs.ContentEntityConverter;
910
import com.rae.cnblogs.basic.AppMobclickAgent;
1011
import com.rae.cnblogs.basic.BasicPresenter;
1112
import com.rae.cnblogs.basic.ContentEntity;
@@ -244,10 +245,12 @@ public String apply(String content) throws Exception {
244245
@Override
245246
public BlogBean apply(String content) {
246247
// 从数据库查询,转换为博客对象
247-
BlogBean data = mDbBlog.getBlog(getView().getContentEntity().getId());
248+
249+
BlogBean data = mDbBlog.getBlog(contentEntity.getId());
248250
if (data == null) {
249251
// 没有查询到博客,可能没保存成功,或者缓存已经删除
250-
throw new NullPointerException("本地数据库没有找到博客信息");
252+
// throw new NullPointerException("本地数据库没有找到博客信息");
253+
data = ContentEntityConverter.convertToBlog(contentEntity);
251254
}
252255
data.setContent(content); // 设置博客内容
253256
return data;

module-blog/src/main/java/com/rae/cnblogs/blog/fragment/BlogDetailFragment.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,15 @@ public void onShare(ShareDialogFragment dialog) {
8484
@Override
8585
public void onCreate(@Nullable Bundle savedInstanceState) {
8686
super.onCreate(savedInstanceState);
87-
mPresenter = new BlogDetailPresenterImpl(this);
8887
// 初始化参数属性
8988
Bundle arguments = getArguments();
9089
if (arguments != null) {
9190
mContentEntity = arguments.getParcelable("entity");
9291
}
92+
mPresenter = new BlogDetailPresenterImpl(this);
93+
if ("NEWS".equalsIgnoreCase(mContentEntity.getType())) {
94+
95+
}
9396

9497
// 初始化WebView
9598
mContentWebViewFragment = ContentWebViewFragment.newInstance(getArguments());

module-blog/src/main/java/com/rae/cnblogs/blog/fragment/KbListFragment.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
package com.rae.cnblogs.blog.fragment;
22

3+
import android.os.Bundle;
4+
35
import com.rae.cnblogs.blog.comm.ContentListContract;
46
import com.rae.cnblogs.blog.content.KbListPresenterImpl;
7+
import com.rae.cnblogs.sdk.bean.CategoryBean;
58

69
/**
710
* 知识库列表
@@ -10,8 +13,12 @@
1013
*/
1114
public class KbListFragment extends MultipleTypeBlogListFragment {
1215

13-
public static KbListFragment newInstance() {
14-
return new KbListFragment();
16+
public static KbListFragment newInstance(CategoryBean category) {
17+
Bundle args = new Bundle();
18+
args.putParcelable("category", category);
19+
KbListFragment fragment = new KbListFragment();
20+
fragment.setArguments(args);
21+
return fragment;
1522
}
1623

1724
@Override

module-blog/src/main/java/com/rae/cnblogs/blog/fragment/NewsListFragment.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.rae.cnblogs.blog.adapter.ContentItemAdapter;
66
import com.rae.cnblogs.blog.comm.ContentListContract;
77
import com.rae.cnblogs.blog.content.NewsListPresenterImpl;
8+
import com.rae.cnblogs.sdk.bean.CategoryBean;
89

910
/**
1011
* 新闻
@@ -13,8 +14,9 @@
1314
*/
1415
public class NewsListFragment extends MultipleTypeBlogListFragment {
1516

16-
public static NewsListFragment newInstance() {
17+
public static NewsListFragment newInstance(CategoryBean category) {
1718
Bundle args = new Bundle();
19+
args.putParcelable("category", category);
1820
NewsListFragment fragment = new NewsListFragment();
1921
fragment.setArguments(args);
2022
return fragment;

0 commit comments

Comments
 (0)