From 9c50057909c7fbb40842dc8e283194c821336ad2 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Mon, 13 Nov 2017 09:11:58 -0800 Subject: [PATCH] Add an empty state for archived --- res/drawable-hdpi/inbox_zero.png | Bin 0 -> 3249 bytes res/drawable-mdpi/inbox_zero.png | Bin 0 -> 2137 bytes res/drawable-xhdpi/inbox_zero.png | Bin 0 -> 3556 bytes res/drawable-xxhdpi/inbox_zero.png | Bin 0 -> 6491 bytes res/drawable-xxxhdpi/inbox_zero.png | Bin 0 -> 3358 bytes .../conversation_list_item_inbox_zero.xml | 31 ++++++++++++ res/values/strings.xml | 2 + .../securesms/ConversationListAdapter.java | 9 +++- .../ConversationListItemInboxZero.java | 46 ++++++++++++++++++ .../securesms/database/ThreadDatabase.java | 3 +- .../loaders/ConversationListLoader.java | 9 +++- 11 files changed, 96 insertions(+), 4 deletions(-) create mode 100644 res/drawable-hdpi/inbox_zero.png create mode 100644 res/drawable-mdpi/inbox_zero.png create mode 100644 res/drawable-xhdpi/inbox_zero.png create mode 100644 res/drawable-xxhdpi/inbox_zero.png create mode 100644 res/drawable-xxxhdpi/inbox_zero.png create mode 100644 res/layout/conversation_list_item_inbox_zero.xml create mode 100644 src/org/thoughtcrime/securesms/ConversationListItemInboxZero.java diff --git a/res/drawable-hdpi/inbox_zero.png b/res/drawable-hdpi/inbox_zero.png new file mode 100644 index 0000000000000000000000000000000000000000..fb95a35cd21611f4d41d0672dba2d43cc011aec7 GIT binary patch literal 3249 zcmaJ^_d6Sm_YGQJEA~vx60OlHjjFx(dJ(l(jaa3Wm(oysRa>dqBt;b|N)c`C5mG{| zmfEQj^Cf0mF+RS3!1w*(-220Qp7X;w_j%5}88%kN>@318004m9)WpE{q9ZR5^%vts z9SSa$0sz>eO$~JIqfuMv#ZcZUKElq{7HR87-4tV;M9QT!)k{2KEO^fzj-;fgA|Nx9 zC!St`ic;mW9DK0z)OWUWFj$H`7DjVtK76~O|4nS&T+|tBiGeHNU^9B~;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yHwD1y*t9M}xm`1aNO1uw!uZsr1 zSHT?vM@~Cc8_}1W1-`lpkpdWQB$Rvpn~?t>t4GL0XM`Y@G?*0LzIKD||0ZV)f3JqP z@R%z%8C~+7=NNplS2AZrj8Mmfch%<8%QIUn{#e?nJb%m<$|cdT;ua+5l)s@P#TKF{ zF=v%>X{9Ki6y(56eOZ{WK~&)6vBg5^bXQm}N7Zs@1sPW9-l8%y!Wu%%1&Gd7R?~;Y zB^ojn8$?+uokSZLnENM1ia0a0-{f(YZbMvPBx)ym%A{8zoh8$+!S=8!{f9U|D(Zq6 zn6@LHj;8?qu;Oo3UdcW8#^T5IJ+C62qVy8frs?vJycak$sd`}C?C=}rI64py_+ zTPjYg=?e_F;f`e{!sx69FU$ z?UG@yq*v!ZXW; zKzX;*HvLwPinD9<*($_M6EC-o&f35txey6Ehy1p`Qrw-ZZWIvtRw)$3{NiGKtD`){ z*9jQ*qpW1^DLypw>crdPkyY&&D!H3LWpI<}2z`8#)7RbI{r;iasSLw(RUBfKgzhzG zX?$bi0@|0VKc)TpINu)o>yhLO!O~5=!k!-pc<07j+x0iGzqU^g&Q59Zp#$?!Etzes z(Ij7#!uU9X-Jw6O%IL^&QZw}mf;;g$T`j958!yj)BKw>P060GvEu3*+`Z)Xe;uQgy M8d@2=*YiyLA1-Gh!~g&Q literal 0 HcmV?d00001 diff --git a/res/drawable-mdpi/inbox_zero.png b/res/drawable-mdpi/inbox_zero.png new file mode 100644 index 0000000000000000000000000000000000000000..7018fde64912d0e0b9fe01fe2c62ae4d5d14ad61 GIT binary patch literal 2137 zcmV-f2&VUmP)^M6=X=P`;JG1-! z=KFr%%+79nNPr6nA~=B{f)fZLIDsI76Zq>@kxWppx*7>Z0=LgWppK}?BP2;e7-O_= zUwiY_m!{v%tN8#a!xH(WUMI*SFkCgplAcH$&B8@Hb_vHGL3+MKdIcUhd;U~MN7wN}LB()laFWtC zX9Aa)kX2R1UEMv;J%48K(6`@w^)s`HlR6!zucSe0?Btcnw^cO{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c$HWiV60Cp=@# zrj5&{eHGJJP1DkfqAbJX)?`zwJu57*5%A(kzuzAqUmwEXl9TtBut&D;+_`fD3pmEy z+}uwG4jf46HZ5;&E2K2=+1pN4={h%AT`2qHLvAc7MJA~=B{f)o4|009602-Xhqyo-bG P00000NkvXXu0mjf+qLR* literal 0 HcmV?d00001 diff --git a/res/drawable-xhdpi/inbox_zero.png b/res/drawable-xhdpi/inbox_zero.png new file mode 100644 index 0000000000000000000000000000000000000000..ca25d05cae591a3149126cedf276b886762d1d14 GIT binary patch literal 3556 zcmb7Hc{CL4+a9~DW8XCjk?cYwMk6G$B`;$zB>Of)Ox7VxDDxH>j9vCYw#FWMEyium$uB}13T z>IxfkJ|EN?-LnM1>dLXb4JP-?=x}C4NM3+2w}N=E);wmrXH)F zQVO=3iyiA{wJB&|QNzKQ>)`^)qHGu6wG~N(f^pHMcMLeo`UrQh$F`MP(cjza3_>=` zR%2Dqe4}61>wPFSO&*I4>E0VJN_MTZCo^e$wozqJr>gMaJt7GSzRlu4=Z|_uzKz%K z3b#mj-2+bEsV+1O-X1>K&?*e8yxXCdWtE-;v|bNQxj*x5p~$)BzuO>n(D`@BGu&sn@?`Yn$* z6bFrsUsQ_5Dt728At}ZQt286i*anK9O*%oHDjjpzqj{qU5kJ-%a2vgh+<1B@0|$ju9dG$cp%qYy|c&3G<6@sqd6^-gKwF%o7r#X#|H-6w`(0r z5_pR{_)2b`HTV)JzdweNGjG||zSF#Pck6{gugr#+>`Pr^t`p4d7dlUgqfj7{NyM@_ zU(WzRfK_9|wu_le+dg$ytiK+FZoMSa&N-9yrZ{HoDOpnb&1mN_z>)BjqWx}>qe{<(I1ys3q-Jl>8*4K z;>6a0talGQZtvFwpynGFbO=TuHAr&UH$*EFpg+cYeQ?6#A(h`I+b3A5e`Npnm60$f z7K&W)UGoP&3+0NleOX*G{$x_@nZYGD=~+8q7dSMz+lms1U6(8o0Uh?85{q=tV;!V> zz?~35FL9*#Yw~PF5uFiFRth??|Kt9U*2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GkO z#-CcXmY5vRGG>}Tu#mNaDkEZ`816Wj-R(waR+V4r$jES5lhd!vPHf<(+`Uk$xQ{sZ z=2tzLmcXvhkY!rJH4ytvBtMIK^8@3w=jj!-FtTu!uZ`iah@#kmkR?W-zg%v0;?)~^ z#ls52_KNw&U@kAZ`jb8wuLwC}VIr9G$j7wvy{}7|VN`U7#?Eh4nSFn;e1Ehl zUi6&t;`!zUTWdES_FlCeJ~W#u%kOVSf1ONJD0}p8%-7<>M=7!z>@rfIl$UQOW*?m3 ztpR=sj|~#IWJ>7{Y3$(2oQZ*ezB~gUBq@7=3y{r5lKEHv^iniCNxiY)C+)S2zAS8!Ci79nj(T&HjG6Xj!x|c7h zWQ6Fdx~g7M*2I7+ z$g6-Je!*D5WcjSQoWVa*xNerZ?o--L5fx~*qHwBf)>gW>f=C?223yj1ei22fU4(T+ z?5K8aN#H)I`=XPRlDxNy7!+r(Zoj!)=>b)olSOp$~obwbm n0RSIB7{kAvc+S`WfU`5VyY9c@Mb%!@r#FDPi4}xk?1ugyOqYty literal 0 HcmV?d00001 diff --git a/res/drawable-xxhdpi/inbox_zero.png b/res/drawable-xxhdpi/inbox_zero.png new file mode 100644 index 0000000000000000000000000000000000000000..a4b06961460e71f5aad1feafa57358e3732f70d7 GIT binary patch literal 6491 zcmd6sXFOcNyT@0o-l9ZrA!>xh>fI8;>OF|wyI}R2s1XspM2+5iWU&Mhy?0B5wMq~@ z$trhq-`yAY-T!kx_r*D%bLPxE^UOTo=Qr~?lc1}uMn=p?3;+Pgo~f(o0{}SO*yo>w z_}Ke$FG&{wz`*fLMaeKQ|0gocn;8{G@XN{S$msaJgIT*h6BWWb%AI6&;1$&tqdNfs zBC5%b8TSi)KGhdZP5oYKjUQj3Zrl;}*_jc)OGU?_vkb8TE5*>fj}ah9+C+M$%Pij* zkP5`U_c6_n2Z>zwEZlerKixmKwQ22`JPKDBEAB}1^75a&DnKtgMbwA@0K@Fr07Yp+ zZooV8Xd=MJ80&k0z5h^ADW)6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h3 zUeUng*tgk6M~}nJL-QLfo|VNI{xKy|yp5g}TUeO+!nl8+LgCUrq~=9*9}2ozxvQU? zm6hCmTGPNoqMFGv+H`UaY#9Ly8Paz1mAbD)IjkTW5{LahT=i5|lvObrw2nvxYmxce z5=FvIz^hxh?AeNyM@^q}Op4ikloO|H!b$hpp588eHw0CW6IkG5c z_1d=+!~~><8g$=(+1{o_12!zr@+8r_!OYvd(v5Z{OB zca{-i;?k}g|Dq5mmyuD#a5;}40GKqmcWw7VFa6H12aUoFW`tf3H-^gJ!La`#Hw*Kw zpC%-E-yn^Yzr zpcu}P7C01rB3|2#If5&MZN8=>zBZT#k?OE5wOE&|Q&I3-e1NS7-PLuhOS7a5k;r<8 z8Rx)C*3&|q<6h82-mM+#tvP?}&l5(?Ai944NQzL7viE)A6<^U!w+<3%#@C-|cFh}F4DwKMkiU;6)*U%Ll*ri@CE}~Ef`PD~o9Qp^9B^r=dKa3xU0R%{v z&AJ@4ExtHdZFQMF^YHNKzE-n*p&$;hXd(*7AS58AZ* zg^hTwwkIDV;jkxc9qVK8xY0w8M%T6{01!_Fi#~6+C4WYEz|mS~$>i#`9IMJXPDLL8 z2pp$27%EwCy^Z&4ed~C!T!v>3V5f6Bg^z`3g?o_zBAG$8|GC3~|LvgRIs$u6a(DOk X$&IP!MEyAS1@KH&TcuvvI{Lo=jfFqg literal 0 HcmV?d00001 diff --git a/res/drawable-xxxhdpi/inbox_zero.png b/res/drawable-xxxhdpi/inbox_zero.png new file mode 100644 index 0000000000000000000000000000000000000000..7f3fc7a3fd0bb1c4ce44730e5b4707648f5633ca GIT binary patch literal 3358 zcmb7E2UJsO7JiA5;6Oq|6hx|`AS#GPkx&v85E21{7*MJpqDWD?(xQwIR7MR7N@!9< z32j6|FG`aVBS;{kR4Eb&2uL6SVIS)`b7ppD_w2rR{`1a%zyIFDJER!WHKu zhp^b7UOY}eFV{W=QxSTBjrS~Y+n~TD!~-6@?tM3qL&WlE5>;Y!Y-}`Fq>~Z37*0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nSS2JS^qx_@JH~#@D{MFz9 literal 0 HcmV?d00001 diff --git a/res/layout/conversation_list_item_inbox_zero.xml b/res/layout/conversation_list_item_inbox_zero.xml new file mode 100644 index 0000000000..149e45ad98 --- /dev/null +++ b/res/layout/conversation_list_item_inbox_zero.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index c47a24118e..53d7620363 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1491,6 +1491,8 @@ Verify Your Number Please enter your mobile number to receive a verification code. Carrier rates may apply. Give your inbox something to write home about. Get started by messaging a friend. + Inbox zeeerrro + Zip. Zilch. Zero. Nada. You\'re all caught up! diff --git a/src/org/thoughtcrime/securesms/ConversationListAdapter.java b/src/org/thoughtcrime/securesms/ConversationListAdapter.java index f6b7fd5a37..16d74d3641 100644 --- a/src/org/thoughtcrime/securesms/ConversationListAdapter.java +++ b/src/org/thoughtcrime/securesms/ConversationListAdapter.java @@ -50,6 +50,7 @@ class ConversationListAdapter extends CursorRecyclerViewAdapter { if (clickListener != null) clickListener.onSwitchToArchive(); }); return new ViewHolder(action); + } else if (viewType == MESSAGE_TYPE_INBOX_ZERO) { + return new ViewHolder((ConversationListItemInboxZero)inflater.inflate(R.layout.conversation_list_item_inbox_zero, parent, false)); } else { final ConversationListItem item = (ConversationListItem)inflater.inflate(R.layout.conversation_list_item_view, parent, false); @@ -148,6 +151,8 @@ class ConversationListAdapter extends CursorRecyclerViewAdapter selectedThreads, boolean batchMode) { + + } +} diff --git a/src/org/thoughtcrime/securesms/database/ThreadDatabase.java b/src/org/thoughtcrime/securesms/database/ThreadDatabase.java index 943d517d08..9d72d5d3c5 100644 --- a/src/org/thoughtcrime/securesms/database/ThreadDatabase.java +++ b/src/org/thoughtcrime/securesms/database/ThreadDatabase.java @@ -608,6 +608,7 @@ public class ThreadDatabase extends Database { public static final int BROADCAST = 1; public static final int CONVERSATION = 2; public static final int ARCHIVE = 3; + public static final int INBOX_ZERO = 4; } public class Reader { @@ -635,7 +636,7 @@ public class ThreadDatabase extends Database { Optional settings; Optional groupRecord; - if (distributionType != DistributionTypes.ARCHIVE) { + if (distributionType != DistributionTypes.ARCHIVE && distributionType != DistributionTypes.INBOX_ZERO) { settings = DatabaseFactory.getRecipientDatabase(context).getRecipientSettings(cursor); groupRecord = DatabaseFactory.getGroupDatabase(context).getGroup(cursor); } else { diff --git a/src/org/thoughtcrime/securesms/database/loaders/ConversationListLoader.java b/src/org/thoughtcrime/securesms/database/loaders/ConversationListLoader.java index 1d527fd948..0620f31785 100644 --- a/src/org/thoughtcrime/securesms/database/loaders/ConversationListLoader.java +++ b/src/org/thoughtcrime/securesms/database/loaders/ConversationListLoader.java @@ -47,10 +47,17 @@ public class ConversationListLoader extends AbstractCursorLoader { ThreadDatabase.ARCHIVED, ThreadDatabase.STATUS, ThreadDatabase.DELIVERY_RECEIPT_COUNT, ThreadDatabase.EXPIRES_IN, ThreadDatabase.LAST_SEEN, ThreadDatabase.READ_RECEIPT_COUNT}, 1); + + if (cursorList.get(0).getCount() <= 0) { + switchToArchiveCursor.addRow(new Object[] {-1L, System.currentTimeMillis(), archivedCount, + "-1", null, 1, ThreadDatabase.DistributionTypes.INBOX_ZERO, + 0, null, 0, -1, 0, 0, 0, -1}); + } + switchToArchiveCursor.addRow(new Object[] {-1L, System.currentTimeMillis(), archivedCount, "-1", null, 1, ThreadDatabase.DistributionTypes.ARCHIVE, 0, null, 0, -1, 0, 0, 0, -1}); - + cursorList.add(switchToArchiveCursor); }