File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
app/src/main/java/org/nsh07/wikireader Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -346,6 +346,20 @@ fun String.toWikitextAnnotatedString(
346346 }
347347 }
348348
349+ currSubstring.startsWith(" {{date" , ignoreCase = true ) -> {
350+ val curr = currSubstring.substringAfter(' |' )
351+ val splitList = curr.split(' |' )
352+ if (splitList.size < 3 ) {
353+ append(splitList[0 ])
354+ } else {
355+ append(splitList[0 ])
356+ append(' ' )
357+ append(splitList[1 ])
358+ append(' ' )
359+ append(splitList[2 ])
360+ }
361+ }
362+
349363 currSubstring.startsWith(" {{distinguish" , ignoreCase = true ) -> {
350364 val textSpecified =
351365 currSubstring.contains(" text=" ) || currSubstring.contains(" text =" )
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ fun AppHomeScreen(
145145 if (s > 1 ) s - = 2
146146 else s = 0
147147
148- val sendIntent: Intent = remember(homeScreenState.title, homeScreenState.currentLang ) {
148+ val sendIntent: Intent = remember(homeScreenState.title, preferencesState.lang ) {
149149 Intent ()
150150 .apply {
151151 action = Intent .ACTION_SEND
@@ -158,7 +158,7 @@ fun AppHomeScreen(
158158 type = " text/plain"
159159 }
160160 }
161- val shareIntent = remember(homeScreenState.title, homeScreenState.currentLang ) {
161+ val shareIntent = remember(homeScreenState.title, preferencesState.lang ) {
162162 Intent .createChooser(sendIntent, null )
163163 }
164164
@@ -236,7 +236,7 @@ fun AppHomeScreen(
236236 shapes = IconButtonDefaults .shapes(),
237237 onClick = remember(
238238 homeScreenState.title,
239- homeScreenState.currentLang
239+ preferencesState.lang
240240 ) {
241241 {
242242 context.startActivity(shareIntent)
You can’t perform that action at this time.
0 commit comments